Export (0) Print
Expand All

3.2.5.5.5 Receiving a SCSI Command Request

When the server receives a request with an OperationCode equal to RSVD_TUNNEL_SCSI_OPERATION, the request handling proceeds as follows:

If MaxOutputResponse is less than 52 (size of SVHDX_TUNNEL_OPERATION_HEADER + size of SVHDX_TUNNEL_SCSI_RESPONSE), the server MUST fail the request with STATUS_INVALID_PARAMETER.

If any of the following conditions is TRUE, the server MUST generate an error response as specified below:

  • Size of the request is less than 36

  • Length field of the request is not equal to 36 bytes

  • SenseInfoExLength is greater than (size of CDBBuffer + 4)

  • CDBLength is greater than the size of CDBBuffer

The SVHDX_TUNNEL_OPERATION_HEADER MUST be initialized. ProtocolId, ProtocolVersion, OperationCode and RequestId fields MUST be set to the values received in the request. Status field MUST be set to STATUS_INVALID_PARAMETER. The SVHDX_TUNNEL_SCSI_RESPONSE MUST be set to the data received in SVHDX_TUNNEL_SCSI_REQUEST structure of the request. The server MUST send SVHDX_TUNNEL_OPERATION_HEADER and SVHDX_TUNNEL_SCSI_RESPONSE to the client and SHOULD NOT<7> add additional data to the response.

Otherwise, the server MUST issue a CDB command to the virtual SCSI disk in an implementation-specific manner.

The server MUST construct a SVHDX_TUNNEL_SCSI_RESPONSE structure as specified in section 2.2.4.8 with the following values:

The SVHDX_TUNNEL_OPERATION_HEADER MUST be initialized as follows:

  • The OperationCode field MUST be set to the OperationCode value of the request.

  • The Status field MUST be set to the value received from the virtual SCSI disk.

  • The RequestId field MUST be set to the value received in the request.

The SVHDX_TUNNEL_SCSI_RESPONSE MUST be initialized as follows:

  • The SenseInfoAutoGenerated field MUST be set to the value received from the virtual SCSI disk.

  • The SrbStatus field MUST be set to one of the values specified in section 2.2.5 reflecting the status indicated by the virtual SCSI disk.

  • The SCSIStatus field MUST be set to value received from the virtual SCSI disk.

  • The DataIn field MUST be set to the value received in the request.

  • The Length field is set to the size, in bytes, of the SVHDX_TUNNEL_SCSI_RESPONSE structure that is constructed following the syntax specified in section 2.2.4.8.

  • The SenseInfoExLength field is set to the length of the sense information received from the virtual SCSI disk, if any.

  • The SenseDataEx field is set to the sense information received from the virtual SCSI disk, if any.

The response MUST be sent to the client.

 
Show:
© 2014 Microsoft