Mass Storage Class Definitions
[USB Protocol Definitions]

Collaboration diagram for Mass Storage Class Definitions:

Data Structures

struct  usb_msc_cbw
 A Command Block Wrapper (CBW). More...
struct  usb_msc_csw
 A Command Status Wrapper (CSW). More...

Defines

#define USB_CBW_SIGNATURE   0x43425355
 dCBWSignature value
#define USB_CBW_DIRECTION_IN   (1 << 7)
 Data from device to host.
#define USB_CBW_LUN_MASK   0x0f
 Valid bits in bCBWLUN.
#define USB_CBW_LEN_MASK   0x1f
 Valid bits in bCBWCBLength.
#define USB_CSW_SIGNATURE   0x53425355
 dCSWSignature value
#define USB_CSW_STATUS_PASS   0x00
 Command Passed.
#define USB_CSW_STATUS_FAIL   0x01
 Command Failed.
#define USB_CSW_STATUS_PE   0x02
 Phase Error.

Enumerations

enum  usb_msc_interface_subclass {
  USB_MSC_SUBCLASS_RBC = 0x01, USB_MSC_SUBCLASS_ATAPI = 0x02, USB_MSC_SUBCLASS_QIC_157 = 0x03, USB_MSC_SUBCLASS_UFI = 0x04,
  USB_MSC_SUBCLASS_SFF_8070I = 0x05, USB_MSC_SUBCLASS_TRANSPARENT = 0x06
}
 

Possible bInterfaceSubClass values for a mass-storage interface.

More...
enum  usb_msc_interface_protocol { USB_MSC_PROTOCOL_CBI = 0x00, USB_MSC_PROTOCOL_CBI_ALT = 0x01, USB_MSC_PROTOCOL_BULK = 0x50 }
 

Possible bInterfaceProtocol values for a mass-storage interface.

More...
enum  usb_msc_reqid { USB_MSC_REQ_BULK_RESET = 0xff, USB_MSC_REQ_GET_MAX_LUN = 0xfe }
 

Mass Storage Bulk-only class specific requests.

More...

Detailed Description

This module contains definitions and data structures taken from the USB Mass Storage Class Specification Overview 1.2 and the USB Mass Storage Class Bulk-Only Transport 1.0 specifications.


Define Documentation

#define USB_CBW_DIRECTION_IN   (1 << 7)

Data from device to host.

Definition at line 109 of file msc_protocol.h.

Referenced by msc_do_read().

#define USB_CBW_LEN_MASK   0x1f

Valid bits in bCBWCBLength.

Definition at line 111 of file msc_protocol.h.

#define USB_CBW_LUN_MASK   0x0f

Valid bits in bCBWLUN.

Definition at line 110 of file msc_protocol.h.

#define USB_CBW_SIGNATURE   0x43425355

dCBWSignature value

Definition at line 108 of file msc_protocol.h.

#define USB_CSW_SIGNATURE   0x53425355

dCSWSignature value

Definition at line 123 of file msc_protocol.h.

#define USB_CSW_STATUS_FAIL   0x01

Command Failed.

Definition at line 125 of file msc_protocol.h.

Referenced by msc_do_read().

#define USB_CSW_STATUS_PASS   0x00

Command Passed.

Definition at line 124 of file msc_protocol.h.

Referenced by msc_do_read().

#define USB_CSW_STATUS_PE   0x02

Phase Error.

Definition at line 126 of file msc_protocol.h.


Enumeration Type Documentation

Possible bInterfaceProtocol values for a mass-storage interface.

Note:
The CBI protocols should not be used in new designs.
Enumerator:
USB_MSC_PROTOCOL_CBI 

Command/Bulk/Interrupt.

USB_MSC_PROTOCOL_CBI_ALT 

W/o command completion.

USB_MSC_PROTOCOL_BULK 

Bulk-only.

Definition at line 79 of file msc_protocol.h.

Possible bInterfaceSubClass values for a mass-storage interface.

Note:
In practice, most devices should use USB_MSC_SUBCLASS_TRANSPARENT and specify the actual command set in the standard INQUIRY data block, even if the MSC spec indicates otherwise. In particular, RBC is not supported by certain major operating systems like Windows XP.
Enumerator:
USB_MSC_SUBCLASS_RBC 

Reduced Block Commands.

USB_MSC_SUBCLASS_ATAPI 

CD/DVD devices.

USB_MSC_SUBCLASS_QIC_157 

Tape devices.

USB_MSC_SUBCLASS_UFI 

Floppy disk drives.

USB_MSC_SUBCLASS_SFF_8070I 

Floppy disk drives.

USB_MSC_SUBCLASS_TRANSPARENT 

Determined by INQUIRY.

Definition at line 64 of file msc_protocol.h.

Mass Storage Bulk-only class specific requests.

Enumerator:
USB_MSC_REQ_BULK_RESET 

Mass Storage Reset.

USB_MSC_REQ_GET_MAX_LUN 

Get Max LUN.

Definition at line 88 of file msc_protocol.h.

Generated on Thu Apr 29 14:10:35 2010 for xplain-bc by  doxygen 1.6.3