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

NAME

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

SYNOPSIS

10       sg_sat_set_features [--count=CO] [--chk_cond] [--feature=FEA]  [--help]
11       [--len=16|12] [--lba=LBA] [--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       SAT standard (SAT ANSI INCITS 431-2007;  prior  draft:  sat-r09.pdf  at
20       www.t10.org)  defines two SCSI "ATA PASS-THROUGH" commands: one using a
21       16 byte "cdb" and the other with a 12 byte cdb. This  utility  defaults
22       to 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
27       The features can be read using the sg_sat_identify utility  which  uses
28       either the ATA IDENTIFY DEVICE (for non-packet devices) or the IDENTIFY
29       PACKET DEVICE (for packet devices) command.
30

OPTIONS

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

NOTES

80       In  the  2.4  series of Linux kernels the DEVICE must be a SCSI generic
81       (sg) device. In the 2.6 series block  devices  (e.g.  disks  and  ATAPI
82       DVDs) can also be specified. For example "sg_inq /dev/sda" will work in
83       the 2.6 series kernels. From lk 2.6.6 other SCSI  "char"  device  names
84       may be used as well (e.g. "/dev/st0m").
85

EXIT STATUS

87       The exit status of sg_sat_set_features is 0 when it is successful. Oth‐
88       erwise see the sg3_utils(8) man page.
89

AUTHOR

91       Written by Doug Gilbert
92

REPORTING BUGS

94       Report bugs to <dgilbert at interlog dot com>.
95
97       Copyright © 2007 Douglas Gilbert
98       This software is distributed under a FreeBSD license. There is NO  war‐
99       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
100       POSE.
101

SEE ALSO

103       sg_sat_identify(sg3_utils),     sg_inq(sg3_utils),      sdparm(sdparm),
104       hdparm(hdparm)
105
106
107
108sg3_utils-1.25                    August 2007           SG_SAT_SET_FEATURES(8)
Impressum