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

NAME

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

SYNOPSIS

10       sg_sat_identify [--ck_cond] [--extend] [--help]  [--hex]  [--len=16|12]
11       [--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  SAT  standard  (SAT  ANSI
20       INCITS  431-2007,  prior draft: sat-r09.pdf at www.t10.org) defines two
21       SCSI "ATA PASS-THROUGH" commands: one using a 16  byte  "cdb"  and  the
22       other  with  a  12 byte cdb. This utility defaults to using the 16 byte
23       cdb variant.
24
25       The SATL may be in an operating system  driver,  in  host  bus  adapter
26       firmware or in some external enclosure.
27

OPTIONS

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

NOTES

84       Since the response to the IDENTIFY  (PACKET)  DEVICE  command  is  very
85       important  for  the  correct use of an ATA(PI) device (and is typically
86       the first command sent), a SATL should provide an ATA  Information  VPD
87       page which contains the similar information.
88
89       The  SCSI ATA PASS-THROUGH (12) command's opcode is 0xa1 and it clashes
90       with the MMC set's BLANK command used by cd/dvd writers. So a  SATL  in
91       front of an ATAPI device that uses MMC (i.e. has peripheral device type
92       5) probably should treat opcode 0xa1 as a BLANK  command  and  send  it
93       through to the cd/dvd drive. The ATA PASS-THROUGH (16) command's opcode
94       (0x85) does not clash with anything so it is a better choice.
95
96       In the 2.4 series of Linux kernels the DEVICE must be  a  SCSI  generic
97       (sg)  device.  In  the  2.6  series block devices (e.g. disks and ATAPI
98       DVDs) can also be specified. For example "sg_inq /dev/sda" will work in
99       the  2.6  series  kernels. From lk 2.6.6 other SCSI "char" device names
100       may be used as well (e.g. "/dev/st0m").
101

EXIT STATUS

103       The exit status of sg_sat_identify is 0 when it is  successful.  Other‐
104       wise see the sg3_utils(8) man page.
105

AUTHOR

107       Written by Doug Gilbert
108

REPORTING BUGS

110       Report bugs to <dgilbert at interlog dot com>.
111
113       Copyright © 2006-2007 Douglas Gilbert
114       This  software is distributed under a FreeBSD license. There is NO war‐
115       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
116       POSE.
117

SEE ALSO

119       sg_vpd(sg3_utils), sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
120
121
122
123sg3_utils-1.26                   December 2007              SG_SAT_IDENTIFY(8)
Impressum