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

NAME

6       sg_sat_set_features  -  use  ATA SET FEATURES command via a SCSI to ATA
7       Translation (SAT) layer
8

SYNOPSIS

10       sg_sat_set_features [--count=CO] [--ck_cond]  [--feature=FEA]  [--help]
11       [--lba=LBA] [--len={16|12}] [--verbose] [--version] DEVICE
12

DESCRIPTION

14       This  utility  sends  an  ATA SET FEATURES command to the DEVICE.  This
15       command is used to change settings of ATA non-packet (i.e.  disks)  and
16       packet  devices (e.g. cd/dvd drives). Rather than send the SET FEATURES
17       command directly to the device it is sent via a SCSI transport which is
18       assumed  to  contain  a SCSI to ATA Translation (SAT) Layer (SATL). The
19       SATL may be in an operating system driver, in host bus adapter firmware
20       or in some external enclosure.
21
22       The SAT standard (SAT ANSI INCITS 431-2007, prior draft: sat-r09.pdf at
23       www.t10.org) defines two SCSI "ATA PASS-THROUGH" commands: one using  a
24       16  byte  "cdb" and the other with a 12 byte cdb. This utility defaults
25       to using the 16 byte cdb variant. SAT-2 is also a standard: SAT-2  ANSI
26       INCITS  465-2010 and the draft prior to that is sat2r09.pdf . The SAT-3
27       project has started and the most recent draft is sat3r01.pdf .
28
29       The features can be read using the sg_sat_identify utility  which  uses
30       either the ATA IDENTIFY DEVICE (for non-packet devices) or the IDENTIFY
31       PACKET DEVICE (for packet devices) command.
32

OPTIONS

34       Arguments to long options are mandatory for short options as well.
35
36       -c, --count=CO
37              the number CO is placed in the "count" field in the ATA SET FEA‐
38              TURES  command. Only some subcommands (a term used for the value
39              placed in the "feature" field) require the  count  field  to  be
40              set.  The default value placed in the "count" field is 0.
41
42       -C, --ck_cond
43              sets  the  CK_COND  bit  in  the  ATA PASS-THROUGH SCSI cdb. The
44              default setting is clear (i.e. 0).  When  set  the  SATL  should
45              yield  a  sense  buffer containing a ATA Result descriptor irre‐
46              spective of whether the ATA command succeeded  or  failed.  When
47              clear the SATL should only yield a sense buffer containing a ATA
48              Result descriptor if the ATA command failed.
49
50       -f, --feature=FEA
51              the value FEA is placed in the "feature" field in  the  ATA  SET
52              FEATURES  command.  The  term "subcommand" is sometimes used for
53              this value. The default value placed in the "feature" field is 0
54              which is reserved and hence should not change anything. Two com‐
55              mon examples are 2h to enable the write cache and 82h to disable
56              it.
57
58       -h, --help
59              outputs  the usage message summarizing command line options then
60              exits. Ignores DEVICE if given.
61
62       -L, --lba=LBA
63              the number LBA is placed in the "lba" field of the ATA SET  FEA‐
64              TURES command. Only some sub-commands (a term used for the value
65              placed in the "feature" field) require the lba field to be  set.
66              This  value  is  typically  not a "logical block address" as the
67              acronym might imply.  The default  value  placed  in  the  "lba"
68              field  is 0. The maximum value allowed for LBA is 0xfffffffe (or
69              0xffffff if --len=12).
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. Some SCSI transports cannot convey SCSI commands longer than
75              12 bytes.
76
77       -v, --verbose
78              increases the level or verbosity.
79
80       -V, --version
81              print out version string
82

NOTES

84       In  the  2.4  series of Linux kernels the DEVICE must be a SCSI generic
85       (sg) device. In the 2.6 and 3 series  block  devices  (e.g.  disks  and
86       ATAPI  DVDs)  can also be specified. For example "sg_inq /dev/sda" will
87       work in the 2.6 series kernels. From lk 2.6.6 other SCSI "char"  device
88       names  may  be  used as well (e.g. "/dev/st0m"). Prior to lk 2.6.29 USB
89       mass storage limited sense data to 18 bytes which  made  the  --ck_cond
90       option yield strange (truncated) results.
91

EXIT STATUS

93       The exit status of sg_sat_set_features is 0 when it is successful. Oth‐
94       erwise see the sg3_utils(8) man page.
95

AUTHOR

97       Written by Douglas Gilbert
98

REPORTING BUGS

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

SEE ALSO

109       sg_sat_identify(sg3_utils),     sg_inq(sg3_utils),      sdparm(sdparm),
110       hdparm(hdparm)
111
112
113
114sg3_utils-1.37                     June 2013            SG_SAT_SET_FEATURES(8)
Impressum