SAT: ATA PASS THROUGH sector count for IDENTIFY DEVICE
dgilbert at interlog.com
Tue Apr 20 11:43:13 PDT 2010
* From the T10 Reflector (t10 at t10.org), posted by:
* Douglas Gilbert <dgilbert at interlog.com>
While debugging some USB-3 storage devices (using
the mass storage class rather than UAS **) the
linux community has stumbled across confusion on
the sector_count field in the ATA PASS THROUGH (12)
and (16) commands defined in SAT and SAT-2.
One tool wants to send an ATA IDENTIFY DEVICE command
through the SAT pass-through to a SATA disk inside
an external USB enclosure. The SCSI ATA PASS THROUGH
command fields are set like this to fetch the 512 byte
response from the IDENTIFY DEVICE command:
PROTOCOL: 4 [PIO DATA-in]
T_DIR: 1 [data-in]
BYTE_BLOCK: 1 [transfer unit is 512 bytes]
T_LENGTH: 2 [use sector_count]
SECTOR_COUNT: 1 or 0 ??
SAT indicates that SECTOR_COUNT should be 1. However
those familiar with ATA see that SECTOR_COUNT maps
to the COUNT field in the ATA IDENTIFY DEVICE command
and that is marked as "N/A". And they interpret that
to mean 0. According to ACS-2 the "N/A" keyword "has no
defined value and should not be checked by the host or
device". So 1 would seem to be permissible but not
obvious to ATA tools tunnelling through SAT.
The SATL in the USB-3 case failed when sector_count=0
but there seem to be plenty of SATLs out there that
accept it and respond with a block of data.
May I suggest an Annex to SAT-3 to show the encoding
of very common ATA commands like IDENTIFY DEVICE through
the ATA PASS THROUGH commands.
** Folk from Intel recently presented some work on the
"UASP" transport to Linux community. A suggestion
that the standard will be called "UAS" seem to fall
on deaf ears.
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org
More information about the T10