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 [--chk_cond] [--help] [--hex] [--len=12|16]  [--packet]
11       [--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 (latest  draft:
20       sat-r09.pdf  at  www.t10.org)  defines two SCSI "ATA PASS-THROUGH" com‐
21       mands: one using a 16 byte "cdb" and the other with a 12 byte cdb. This
22       utility defaults to using the 16 byte cdb variant.
23
24       The  SATL  may  be  in  an operating system driver, in host bus adapter
25       firmware or in some external enclosure.
26

OPTIONS

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

NOTES

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

EXIT STATUS

97       The  exit  status of sg_sat_identify is 0 when it is successful. Other‐
98       wise see the sg3_utils(8) man page.
99

AUTHOR

101       Written by Doug Gilbert
102

REPORTING BUGS

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

SEE ALSO

113       sg_vpd(sg3_utils), sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
114
115
116
117sg3_utils-1.23                   January 2007               SG_SAT_IDENTIFY(8)
Impressum