Information Technology Reference
In-Depth Information
inserting removable media, a change in INQUIRY data, and a reset of the
device or a logical unit.
A device in the UNIT ATTENTION condition should fail all commands
except INQUIRY, REPORT LUNS, and REQUEST SENSE. On receiving
a command other than these, a device should return 01h (command failed)
in the bCSWStatus field of the CSW. The host then sends a REQUEST
SENSE command to obtain status information.
In preparing a response to the REQUEST SENSE command, the device sets
the SENSE KEY field to 06h (UNIT ATTENTION) and sets the ASC and
ASCQ fields of the sense data to describe the reason for the condition. After
returning the sense data, the device is no longer in the UNIT ATTEN-
TION condition.
Informing the Host about Media Changes
A device that interfaces to a MultiMediaCard or other removable media
should inform the USB host when a card is inserted. A device must also
inform the host if the host attempts to access the device when the media has
been removed or the device isn't ready to perform read, write, or verify oper-
ations for another reason.
To inform the host that media has been inserted, a device can generate a
UNIT ATTENTION condition and set ASC = 28h and ASCQ = 00h,
which the SPC specification defines as NOT READY TO READY
CHANGE, MEDIUM MAY HAVE CHANGED.
On receiving a media-access command when the media is removed, a device
should set the SENSE KEY field to 02h (NOT READY) and set ASC = 3Ah
and ASCQ = 00h, which the SPC specification defines as MEDIUM NOT
PRESENT.
After a device reports that the media isn't present, a host may send periodic
TEST UNIT READY commands to find out if media has been inserted.
After a device reports that the media has changed, the host can send com-
mands to learn about the new media.
In a similar way, a device that accesses files on its own (not via the USB host)
should inform the USB host when firmware has written to a file or made
other changes to a volume's contents. A device can do so via the UNIT
ATTENTION condition as described above. Another option is to allow
Search WWH ::




Custom Search