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.
Definition: msc.h:82
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_MODE_SENSE_6.
Definition: msc.h:253
SCSI Read Capacity 10 Command: Read Capacity.
Definition: msc.h:320
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...
Definition: msc.h:100
SCSI Read 10 Command.
Definition: msc.h:340
uint32_t tag
The device shall set this field to the value received in the dCBWTag of the associated CBW...
Definition: msc.h:112
QIC-157. Typically used by a tape device.
Definition: msc.h:62
uint32_t data_residue
For Data-Out the device shall report in the dCSWDataResiduethe difference between the amount of data ...
Definition: msc.h:113
The SCSI Test Unit Ready command is used to determine if a device is ready to transfer data (read/wri...
Definition: msc.h:125
MSC_CSW_STATUS_FAILED.
Definition: msc.h:92
Constant value of 43425355h (little endian)
Definition: msc.h:69
Constant value of 53425355h (little endian)
Definition: msc.h:70
uint8_t lun
The device Logical Unit Number (LUN) to which the command block is being sent. For devices that suppo...
Definition: msc.h:102
provides a means for the application client to specify medium, logical unit, or peripheral device par...
Definition: msc.h:127
uint32_t signature
Signature that helps identify this data packet as a CBW. The signature field shall contain the value ...
Definition: msc.h:98
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.
Definition: msc.h:128
The WRITE (10) command requests thatthe device server transfer the specified logical block(s) from th...
Definition: msc.h:134
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_INQUIRY.
Definition: msc.h:170
SFF-8070i. Can be used by Floppy Disk Drive (FDD) device.
Definition: msc.h:64
uint8_t cmd_code
SCSI OpCode.
Definition: msc.h:341
The SCSI Request Sense command is part of the SCSI computer protocol standard. This command is used t...
Definition: msc.h:131
Bulk-Only Transport.
Definition: msc.h:78
Indicates the disc drive aborted the command.
Definition: msc.h:148
Control/Bulk/Interrupt protocol (with command completion interrupt)
Definition: msc.h:76
MSC_CSW_STATUS_PHASE_ERROR.
Definition: msc.h:93
The READ (10) command requests that the device server read the specified logical block(s) and transfe...
Definition: msc.h:133
The SCSI Inquiry command is used to obtain basic information from a target device.
Definition: msc.h:126
SCSI Read Capacity 10 Response Data.
Definition: msc.h:332
The command allows the Host to request a list of the possible format capacities for an installed writ...
Definition: msc.h:132
uint16_t block_count
Number of Blocks used by this command.
Definition: msc.h:345
uint32_t lba
The first Logical Block Address (LBA) accessed by this command.
Definition: msc.h:343
MSC_CSW_STATUS_PASSED.
Definition: msc.h:91
SCSI Inquiry Response Data.
Definition: msc.h:181
uint8_t reserved
Obsolete.
Definition: msc.h:231
uint8_t lun
Logical Unit.
Definition: msc.h:161
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_READ_CAPACITY_10.
Definition: msc.h:321
msc_subclass_type_t
MassStorage Subclass.
Definition: msc.h:59
scsi_sense_key_type_t
SCSI Sense Key.
Definition: msc.h:138
Indicates the command terminated with a non-recovered error condition.
Definition: msc.h:142
Indicates a buffered peripheral device has reached the end of medium partition and data remains in th...
Definition: msc.h:150
uint32_t last_lba
The last Logical Block Address of the device.
Definition: msc.h:333
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.
Definition: msc.h:84
uint32_t tag
Tag sent by the host. The device shall echo the contents of this field back to the host in the dCSWTa...
Definition: msc.h:99
uint8_t cmd_len
The valid length of the CBWCBin bytes. This defines the valid length of the command block...
Definition: msc.h:103
Control/Bulk/Interrupt protocol (without command completion interrupt)
Definition: msc.h:77
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.
Definition: msc.h:174
The Get Max LUN device request is used to determine the number of logical units supported by the devi...
Definition: msc.h:83
Indicates the disc drive detected a nonrecoverable hardware failure while performing the command or d...
Definition: msc.h:143
Indicates that a command that reads or writes the medium was attempted on a block that is protected f...
Definition: msc.h:146
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.
Definition: msc.h:101
Indicates a SEARCH DATA command has satisfied an equal comparison.
Definition: msc.h:149
msc_csw_status_t
Command Block Status Values.
Definition: msc.h:90
Command Status Wrapper.
Definition: msc.h:110
scsi_cmd_type_t
SCSI Command Operation Code.
Definition: msc.h:124
Indicates an illegal parameter in the command descriptor block or in the additional parameters...
Definition: msc.h:144
UFI. Typically used by Floppy Disk Drive (FDD) device.
Definition: msc.h:63
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL.
Definition: msc.h:279
ndicates that the source data did not match the data read from the medium.
Definition: msc.h:151
no specific Sense Key. This would be the case for a successful command
Definition: msc.h:139
The SCSI Read Capacity command is used to obtain data capacity information from a target device...
Definition: msc.h:130
Command Block Wrapper.
Definition: msc.h:97
SCSI transparent command set.
Definition: msc.h:65
Reduced Block Commands (RBC) T10 Project 1240-D.
Definition: msc.h:60
uint8_t cmd_code
SCSI OpCode for SCSI_CMD_TEST_UNIT_READY.
Definition: msc.h:160
uint32_t signature
Signature that helps identify this data packet as a CSW. The signature field shall contain the value ...
Definition: msc.h:111
uint8_t status
indicates the success or failure of the command. Values from msc_csw_status_t
Definition: msc.h:114
uint32_t lba
The first Logical Block Address (LBA) accessed by this command.
Definition: msc.h:323
Indicates the logical unit addressed cannot be accessed.
Definition: msc.h:141
uint32_t block_size
Block size in bytes.
Definition: msc.h:334
ndicates the last command completed successfully with some recovery action performed by the disc driv...
Definition: msc.h:140
Vendor specific sense key.
Definition: msc.h:147
msc_protocol_type_t
MassStorage Protocol.
Definition: msc.h:75
SCSI Test Unit Ready Command.
Definition: msc.h:159
SFF-8020i, MMC-2 (ATAPI). Typically used by a CD/DVD device.
Definition: msc.h:61
SCSI Inquiry Command.
Definition: msc.h:169
Indicates the disc drive may have been reset.
Definition: msc.h:145