Product manual

Spinpoint M9TU-USB 3.0 Product Manual REV 1.0
80
USB INTERFACE AND USB COMMANDS
6.4.3.3.2 Data Transport
All data transport shall begin on a packet boundary. The host shall attempt to transfer the exact number of
bytes to or from the device as specified by the dCBWDataTransferLength and the Direction bit. The device
shall respond as specified in 6 - Host/Device Data Transfers.
To report an error before data transport completes and to maximize data integrity, the device may terminate the
command by STALLing the endpoint in use (the Bulk-In endpoint during data in, the Bulk-Out endpoint during
data out).
6.4.3.3.3 Status Transport
The device shall send each CSW to the host via the Bulk-In endpoint. The CSW shall start on a packet
boundary and end as a short packet with exactly 13 (Dh) bytes transferred. Figure 6-36 - Status Transport
Flow defines the algorithm the host shall use for any CSW transfer.
The CSW indicates to the host the status of the execution of the command block from the corresponding CBW.
The dCSWDataResidue field indicates how much of the data transferred is to be considered processed or
relevant. The host shall ignore any data received beyond that which is relevant.
6.4.3.3.4 Phase Error
The host shall perform a Reset Recovery when Phase Error status is returned in the CSW.
6.4.3.3.5 Reset Recovery
For Reset Recovery the host shall issue in the following order:
(a) a Bulk-Only Mass Storage Reset
(b) a Clear Feature HALT to the Bulk-In endpoint
(c) a Clear Feature HALT to the Bulk-Out endpoint
6.4.4 Host/Device Data Transfers
6.4.4.1 Overview
A Bulk-Only Protocol transaction begins with the host sending a CBW to the device and attempting to make
the appropriate data transfer (In, Out or none). The device receives the CBW, checks and interprets it, attempts
to satisfy the host's request, and returns status via a CSW. This section describes in more detail this interaction
between the host and the device during normal and abnormal Bulk-Only Protocol transactions.
6.4.4.2 Valid and Meaningful CBW
The host communicates its intent to the device through the CBW. The device performs two verifications on
every CBW received. First, the device verifies that what was received is a valid CBW. Next, the device
determines if the data within the CBW is meaningful.
The device shall not use the contents of the dCBWTag in any way other than to copy its value to the
dCSWTag of the corresponding CSW.
Valid CBW
The device shall consider the CBW valid when:
The CBW was received after the device had sent a CSW or after a reset,
the CBW is 31 (1Fh) bytes in length,
and the dCBWSignature is equal to 43425355h.
Meaningful CBW
The device shall consider the contents of a valid CBW meaningful when:
no reserved bits are set,
the bCBWLUN contains a valid LUN supported by the device,
and both bCBWCBLength and the content of the CBWCB are in accordance with
bInterfaceSubClass.