The developer's resource for computer interfacing, especially USB, serial (COM) ports, mass storage, and embedded networking. (Formerly Lvr.com)

Home > USB Central > Mass Storage Page > Device Problems

USB Mass Storage Device Problems

These are reported problems with various USB mass-storage devices. If you're developing device firmware, check this list for common problems to avoid. If you're developing host software, check this list for problems you may need to work around. Thanks to Brian Berg's Storage Reference List for many of these. Additions, corrections, and suggestions welcome via

Descriptor Problems

The device’s bInterfaceSubClass is FFh instead of 06h or another value defined by the USB mass-storage specifications.

The device’s bInterfaceProtocol is invalid (should be 50h for bulk-only transport).

The device has no serial number or the serial number has invalid characters as defined in the bulk-only transport specification.

Multiple devices with the same Vendor ID and Product ID have the same serial number.

Different device or firmware revisions have the same bcdDevice value.

Control Transfer Problems

A device with multiple LUNs doesn’t implement the Get Max LUN request.

When the endpoint isn’t halted, receiving a Clear Feature (ENDPOINT_HALT) request for the endpoint causes the device to crash.

On receiving a Clear Feature (ENDPOINT_HALT) request followed by a Get Status (ENDPOINT) request, the device crashes.

The device doesn’t implement the Bulk-only Mass Storage Reset request properly. To work around this failure, a host might need to issue a Set Port Feature (PORT_RESET) request to the device’s hub port.

On receiving a Set Interface request, the device doesn’t reset the data toggles for the bulk endpoints.

General Problems with Commands

The device has a single LUN but responds to commands for any LUN.

The signature in the CSW is incorrect.

The device returns no data or incorrect data in the dCSWDataResidue field.

The data-transport phase fails unless there is a delay of up to 120 msecs. between the end of the command-transport phase and the beginning of the data-transport phase.

After completing enumeration, the device requires a few seconds before it responds properly to received CBWs.

In commands where the device may return variable-length data in the data-transport phase, after returning all available data but less than the requested amount of data, the device returns 01h (failed) in the bCSWStatus field of the CSW.

The device can only do transfers of 32 KB, or can only do transfers of 32 KB or less, or returns invalid dCSWDataResidue data in the CSW for transfers greater than 32 KB.

Problems with Specific SCSI Commands

Specific commands challenge some devices.

INQUIRY

The device crashes if the ALLOCATION LENGTH parameter doesn’t equal 36.

The device returns an incorrect value in the VERSION field (byte 2). See the SPC specification or other relevant command-set documents for the correct values for your device.

The device returns 05h (SPC-3) in the VERSION field but the device doesn’t support the REPORT LUNS command (mandatory for SPC-3).

The device returns an incorrect value in the ADDITIONAL LENGTH parameter.

When a UNIT ATTENTION condition exists, the device fails the command and returns a sense key of UNIT ATTENTION. (The device should perform the command and should not report or clear the UNIT ATTENTION condition.)

MODE SENSE

The device crashes if the ALLOCATION LENGTH parameter doesn’t equal 192.

When the PAGE CODE parameter equals 3Fh (Return all subpage 00h mode pages in page_0 format), the device crashes.

The device doesn’t implement all mode pages required by relevant specifications.

The device doesn’t implement all mandatory versions of the command. Read/write devices that are bootable and that don’t have a PDT of 05h (CD/DVD drive) must support MODE SENSE(10).

PREVENT ALLOW MEDIUM REMOVAL

On receiving the command, the device stops functioning or behaves as if the storage media is removed even if it isn’t.

READ

The device doesn’t implement all mandatory versions of the command. Devices that comply with SBC-2 or SBC-3 should implement both READ(6) and READ(10).

READ CAPACITY

The LOGICAL BLOCK ADDRESS field contains an incorrect value (the correct value + 1) because the device is reporting the number of sectors rather than the LBA of the highest sector.

REQUEST SENSE

In devices with removable media, when the media changes, the device doesn’t set the SENSE KEY to 06h (UNIT ATTENTION) to indicate the change (required by SBC-2 and SBC-3).

START STOP UNIT

On receiving the command, the device crashes.

WRITE

The device doesn’t implement all mandatory versions of the command. Writable devices that comply with SBC-2 or SBC-3 should implement both WRITE(6) and WRITE(10).

Also See

unusual_devs.h. The file that handles non-compliant mass-storage devices in Linux.

The unusual_devs guide from Phil Dibowitz.