97 typedef ATTR_PACKED_STRUCT(
struct) {
104 uint8_t command[16] ;
110 typedef ATTR_PACKED_STRUCT(
struct) {
129 SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1E,
159 typedef ATTR_PACKED_STRUCT(
struct) {
162 uint8_t reserved[3] ;
169 typedef ATTR_PACKED_STRUCT(
struct) {
178 STATIC_ASSERT(
sizeof(
scsi_inquiry_t) == 6,
"size is not correct");
181 typedef ATTR_PACKED_STRUCT(
struct)
183 uint8_t peripheral_device_type : 5;
184 uint8_t peripheral_qualifier : 3;
187 uint8_t is_removable : 1;
191 uint8_t response_data_format : 4;
192 uint8_t hierarchical_support : 1;
193 uint8_t normal_aca : 1;
196 uint8_t additional_length;
200 uint8_t third_party_copy : 1;
201 uint8_t target_port_group_support : 2;
202 uint8_t access_control_coordinator : 1;
203 uint8_t scc_support : 1;
207 uint8_t multi_port : 1;
209 uint8_t enclosure_service : 1;
219 uint8_t vendor_id[8] ;
220 uint8_t product_id[16] ;
221 uint8_t product_revision[4] ;
227 typedef ATTR_PACKED_STRUCT(
struct) {
228 uint8_t response_code : 7;
233 uint8_t sense_key : 4;
235 uint8_t incorrect_len_idicatior : 1;
236 uint8_t end_of_medium : 1;
237 uint8_t filemark : 1;
239 uint32_t information;
240 uint8_t additional_sense_len;
241 uint32_t command_specific_info;
242 uint8_t additional_sense_code;
243 uint8_t additional_sense_qualifier;
244 uint8_t field_replaceable_unit_code;
246 uint8_t sense_key_specific[3];
252 typedef ATTR_PACKED_STRUCT(
struct) {
256 uint8_t disable_block_descriptor : 1;
259 uint8_t page_code : 6;
260 uint8_t page_control : 2;
262 uint8_t subpage_code;
263 uint8_t alloc_length;
269 typedef ATTR_PACKED_STRUCT(
struct) {
270 uint8_t mode_data_length;
272 uint8_t device_specific_para;
273 uint8_t block_descriptor_length;
278 typedef ATTR_PACKED_STRUCT(
struct) {
281 uint8_t prohibit_removal;
291 typedef ATTR_PACKED_STRUCT(
struct) {
294 uint16_t alloc_length;
300 typedef ATTR_PACKED_STRUCT(
struct){
308 uint16_t block_size_u16;
320 typedef ATTR_PACKED_STRUCT(
struct) {
325 uint8_t partial_medium_indicator ;
340 typedef ATTR_PACKED_STRUCT(
struct) {
349 STATIC_ASSERT(
sizeof(
scsi_read10_t) == 10,
"size is not correct");
350 STATIC_ASSERT(
sizeof(scsi_write10_t) == 10,
"size is not correct");
msc_request_type_t
MassStorage Class-Specific Control Request.
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_MODE_SENSE_6.
SCSI Read Capacity 10 Command: Read Capacity.
uint32_t xfer_bytes
The number of bytes of data that the host expects to transfer on the Bulk-In or Bulk-Out endpoint (as...
uint32_t tag
The device shall set this field to the value received in the dCBWTag of the associated CBW...
QIC-157. Typically used by a tape device.
uint32_t data_residue
For Data-Out the device shall report in the dCSWDataResiduethe difference between the amount of data ...
The SCSI Test Unit Ready command is used to determine if a device is ready to transfer data (read/wri...
Constant value of 43425355h (little endian)
Constant value of 53425355h (little endian)
uint8_t lun
The device Logical Unit Number (LUN) to which the command block is being sent. For devices that suppo...
provides a means for the application client to specify medium, logical unit, or peripheral device par...
uint32_t signature
Signature that helps identify this data packet as a CBW. The signature field shall contain the value ...
provides a means for a device server to report parameters to an application client. It is a complementary command to the MODE SELECT(6) command. Device servers that implement the MODE SENSE(6) command shall also implement the MODE SELECT(6) command.
The WRITE (10) command requests thatthe device server transfer the specified logical block(s) from th...
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_INQUIRY.
SFF-8070i. Can be used by Floppy Disk Drive (FDD) device.
uint8_t cmd_code
SCSI OpCode.
The SCSI Request Sense command is part of the SCSI computer protocol standard. This command is used t...
Indicates the disc drive aborted the command.
Control/Bulk/Interrupt protocol (with command completion interrupt)
MSC_CSW_STATUS_PHASE_ERROR.
The READ (10) command requests that the device server read the specified logical block(s) and transfe...
The SCSI Inquiry command is used to obtain basic information from a target device.
SCSI Read Capacity 10 Response Data.
The command allows the Host to request a list of the possible format capacities for an installed writ...
uint16_t block_count
Number of Blocks used by this command.
uint32_t lba
The first Logical Block Address (LBA) accessed by this command.
SCSI Inquiry Response Data.
uint8_t reserved
Obsolete.
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_READ_CAPACITY_10.
msc_subclass_type_t
MassStorage Subclass.
scsi_sense_key_type_t
SCSI Sense Key.
Indicates the command terminated with a non-recovered error condition.
Indicates a buffered peripheral device has reached the end of medium partition and data remains in th...
uint32_t last_lba
The last Logical Block Address of the device.
This request is used to reset the mass storage device and its associated interface. This class-specific request shall ready the device for the next CBW from the host.
uint32_t tag
Tag sent by the host. The device shall echo the contents of this field back to the host in the dCSWTa...
uint8_t cmd_len
The valid length of the CBWCBin bytes. This defines the valid length of the command block...
Control/Bulk/Interrupt protocol (without command completion interrupt)
uint8_t alloc_length
specifies the maximum number of bytes that USB host has allocated in the Data-In Buffer. An allocation length of zero specifies that no data shall be transferred.
The Get Max LUN device request is used to determine the number of logical units supported by the devi...
Indicates the disc drive detected a nonrecoverable hardware failure while performing the command or d...
Indicates that a command that reads or writes the medium was attempted on a block that is protected f...
uint8_t dir
Bit 7 of this field define transfer direction - 0 : Data-Out from host to the device. - 1 : Data-In from the device to the host.
Indicates a SEARCH DATA command has satisfied an equal comparison.
msc_csw_status_t
Command Block Status Values.
scsi_cmd_type_t
SCSI Command Operation Code.
Indicates an illegal parameter in the command descriptor block or in the additional parameters...
UFI. Typically used by Floppy Disk Drive (FDD) device.
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL.
ndicates that the source data did not match the data read from the medium.
no specific Sense Key. This would be the case for a successful command
The SCSI Read Capacity command is used to obtain data capacity information from a target device...
SCSI transparent command set.
Reduced Block Commands (RBC) T10 Project 1240-D.
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_TEST_UNIT_READY.
uint32_t signature
Signature that helps identify this data packet as a CSW. The signature field shall contain the value ...
uint8_t status
indicates the success or failure of the command. Values from msc_csw_status_t
uint32_t lba
The first Logical Block Address (LBA) accessed by this command.
Indicates the logical unit addressed cannot be accessed.
uint32_t block_size
Block size in bytes.
ndicates the last command completed successfully with some recovery action performed by the disc driv...
Vendor specific sense key.
msc_protocol_type_t
MassStorage Protocol.
SCSI Test Unit Ready Command.
SFF-8020i, MMC-2 (ATAPI). Typically used by a CD/DVD device.
Indicates the disc drive may have been reset.