1SG_SAT_IDENTIFY(8)                 SG3_UTILS                SG_SAT_IDENTIFY(8)
2
3
4

NAME

6       sg_sat_identify  -  send  ATA  IDENTIFY  DEVICE command via SCSI to ATA
7       Translation (SAT) layer
8

SYNOPSIS

10       sg_sat_identify  [--ck_cond]  [--extend]  [--help]  [--hex]   [--ident]
11       [--len={16|12}] [--packet] [--raw] [--verbose] [--version] DEVICE
12

DESCRIPTION

14       This  utility  sends  either  an  ATA IDENTIFY DEVICE command or an ATA
15       IDENTIFY PACKET DEVICE command to DEVICE and outputs the response.  The
16       devices  that respond to these commands are ATA disks and ATAPI devices
17       respectively.  Rather than send these commands directly to  the  device
18       they  are  sent via a SCSI transport which is assumed to contain a SCSI
19       to ATA Translation (SAT) Layer (SATL). The SATL may be in an  operating
20       system  driver, in host bus adapter firmware or in some external enclo‐
21       sure.
22
23       The SAT standard (SAT ANSI INCITS 431-2007, prior draft: sat-r09.pdf at
24       www.t10.org)  defines two SCSI "ATA PASS-THROUGH" commands: one using a
25       16 byte "cdb" and the other with a 12 byte cdb. This  utility  defaults
26       to  using the 16 byte cdb variant. SAT-2 is also a standard: SAT-2 ANSI
27       INCITS 465-2010 and the draft prior to that is sat2r09.pdf . The SAT/-3
28       project has started and the most recent draft is sat3r01.pdf .
29

OPTIONS

31       Arguments to long options are mandatory for short options as well.
32
33       -c, --ck_cond
34              sets  the  CK_COND  bit  in  the  ATA PASS-THROUGH SCSI cdb. The
35              default setting is clear (i.e. 0).  When  set  the  SATL  should
36              yield  a  sense  buffer containing a ATA Result descriptor irre‐
37              spective of whether the command succeeded or failed. When  clear
38              the  SATL  should  only  yield  a  sense buffer containing a ATA
39              Result descriptor if the command failed.
40
41       -e, --extend
42              sets the EXTEND bit  in  the  ATA  PASS-THROUGH  SCSI  cdb.  The
43              default setting is clear (i.e. 0). When set a 48 bit LBA command
44              is sent to the device. This option has no effect when --len=12.
45
46       -h, --help
47              outputs the usage message summarizing command line options  then
48              exits. Ignores DEVICE if given.
49
50       -H, --hex
51              outputs  the  ATA  IDENTIFY (PACKET) DEVICE response in hex. The
52              default action (i.e. without any '-H' options) is to output  the
53              response  in  hex,  grouped  in 16 bit words (i.e. the ATA stan‐
54              dard's preference).  When given once, the response is output  in
55              ASCII  hex  bytes  (i.e.  the  SCSI standard's preference). When
56              given twice (i.e. '-HH') the output is in hex, grouped in 16 bit
57              words,  the same as the default but without a header. When given
58              thrice (i.e. '-HHH') the output is in hex,  grouped  in  16  bit
59              words,  in  a format that is acceptable for 'hdparm --Istdin' to
60              process.
61
62       -i, --ident
63              outputs the World Wide Name (WWN) of the device. This should  be
64              a  NAA-5  64 bit number. It is output in hex prefixed with "0x".
65              If not available then "0x0000000000000000" is output. The equiv‐
66              alent  for a SCSI disk (i.e. its logical unit name) can be found
67              with "sg_vpd -ii".
68
69       -l, --len={16|12}
70              this is the length of the SCSI cdb used for the ATA PASS-THROUGH
71              commands.   The  argument can either be 16 or 12. The default is
72              16. The larger cdb size is needed for 48 bit LBA  addressing  of
73              ATA  devices. On the other hand some SCSI transports cannot con‐
74              vey SCSI commands longer than 12 bytes.
75
76       -p, --packet
77              send an ATA IDENTIFY PACKET DEVICE command (via the  SATL).  The
78              default action is to send an ATA IDENTIFY DEVICE command.
79
80       -r, --raw
81              output  the ATA IDENTIFY (PACKET) DEVICE response in binary. The
82              output should be piped to a file or another  utility  when  this
83              option  is  used.   The binary is sent to stdout, and errors are
84              sent to stderr.
85
86       -v, --verbose
87              increases the level or verbosity.
88
89       -V, --version
90              print out version string
91

NOTES

93       Since the response to the IDENTIFY  (PACKET)  DEVICE  command  is  very
94       important  for  the  correct use of an ATA(PI) device (and is typically
95       the first command sent), a SATL should provide an ATA  Information  VPD
96       page which contains the similar information.
97
98       The  SCSI ATA PASS-THROUGH (12) command's opcode is 0xa1 and it clashes
99       with the MMC set's BLANK command used by cd/dvd writers. So a  SATL  in
100       front of an ATAPI device that uses MMC (i.e. has peripheral device type
101       5) probably should treat opcode 0xa1 as a BLANK  command  and  send  it
102       through to the cd/dvd drive. The ATA PASS-THROUGH (16) command's opcode
103       (0x85) does not clash with anything so it is a better choice.
104
105       In the 2.4 series of Linux kernels the DEVICE must be  a  SCSI  generic
106       (sg)  device.  In  the  2.6  series block devices (e.g. disks and ATAPI
107       DVDs) can also be specified. For example "sg_inq /dev/sda" will work in
108       the  2.6  series  kernels. From lk 2.6.6 other SCSI "char" device names
109       may be used as well (e.g. "/dev/st0m"). Prior to  lk  2.6.29  USB  mass
110       storage  limited sense data to 18 bytes which made the --ck_cond option
111       yield strange (truncated) results.
112

EXIT STATUS

114       The exit status of sg_sat_identify is 0 when it is  successful.  Other‐
115       wise see the sg3_utils(8) man page.
116

AUTHOR

118       Written by Douglas Gilbert
119

REPORTING BUGS

121       Report bugs to <dgilbert at interlog dot com>.
122
124       Copyright © 2006-2013 Douglas Gilbert
125       This  software is distributed under a FreeBSD license. There is NO war‐
126       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
127       POSE.
128

SEE ALSO

130       sg_vpd(sg3_utils), sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
131
132
133
134sg3_utils-1.37                     June 2013                SG_SAT_IDENTIFY(8)
Impressum