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]  [--indent]
11       [--len={16|12}] [--packet] [--raw] [--readonly] [--verbose] [--version]
12       DEVICE
13

DESCRIPTION

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

OPTIONS

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

NOTES

99       Since  the  response  to  the  IDENTIFY (PACKET) DEVICE command is very
100       important for the correct use of an ATA(PI) device  (and  is  typically
101       the  first  command sent), a SATL should provide an ATA Information VPD
102       page which contains the similar information.
103
104       The SCSI ATA PASS-THROUGH (12) command's opcode is 0xa1 and it  clashes
105       with  the  MMC set's BLANK command used by cd/dvd writers. So a SATL in
106       front of an ATAPI device that uses MMC (i.e. has peripheral device type
107       5)  probably  should  treat  opcode 0xa1 as a BLANK command and send it
108       through to the cd/dvd drive. The ATA PASS-THROUGH (16) command's opcode
109       (0x85) does not clash with anything so it is a better choice.
110
111       Prior  to Linux kernel 2.6.29 USB mass storage limited sense data to 18
112       bytes  which  made  the  --ck_cond  option  yield  strange  (truncated)
113       results.
114

EXIT STATUS

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

AUTHOR

120       Written by Douglas Gilbert
121

REPORTING BUGS

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

SEE ALSO

132       sg_vpd(sg3_utils), sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
133
134
135
136sg3_utils-1.40                   November 2014              SG_SAT_IDENTIFY(8)
Impressum