1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4  <title>Linux sdparm utility</title>
5  <meta http-equiv="Content-Type"
6 content="text/html; charset=iso-8859-1">
7  <meta name="keywords"
8 content="sdparm, SCSI utility, Linux hdparm variant, mode page">
9  <meta name="GENERATOR"
10 content="Mozilla/4.79 [en] (X11; U; Linux 2.5.31 i686) [Netscape]">
11</head>
12<body alink="#ff0000" background="paper.jpg" bgcolor="#ffffff"
13 link="#0000ff" text="#000000" vlink="#000080">
14<center>
15<h1><a class="mozTocH1" name="mozTocId871473"></a> The
16sdparm utility</h1>
17</center>
18<ol id="mozToc">
19<!--mozToc h1 1 h2 2 h3 3 h4 4 h5 5 h6 6-->
20  <li><a href="#mozTocId871473"> The
21sdparm utility</a>
22    <ol>
23      <li><a href="#mozTocId812196">Introduction</a></li>
24      <li><a href="#mozTocId783733">SCSI mode pages</a></li>
25      <li><a href="#mozTocId968100">VPD pages</a></li>
26      <li><a href="#mozTocId592219">sdparm commands</a></li>
27      <li><a href="#mozTocId683013">sdparm syntax</a></li>
28      <li><a href="#mozTocId675268">Exit status</a></li>
29      <li><a href="#mozTocId808937">Transports</a>
30        <ol>
31          <li><a href="#mozTocId926648">USB</a></li>
32          <li><a href="#mozTocId28143">IEEE 1394</a></li>
33          <li><a href="#mozTocId752074">SATA</a></li>
34        </ol>
35      </li>
36      <li><a href="#mozTocId378082">Vendor specific mode
37pages</a></li>
38      <li><a href="#mozTocId67897">Supported operating
39systems</a>
40        <ol>
41          <li><a href="#mozTocId600630"> Linux </a>
42            <ol>
43              <li><a href="#mozTocId262297">hdparm mapping</a></li>
44            </ol>
45          </li>
46          <li><a href="#mozTocId197336">FreeBSD </a></li>
47          <li><a href="#mozTocId284244">Solaris</a></li>
48          <li><a href="#mozTocId997981">Tru64 </a></li>
49          <li><a href="#mozTocId891504">Windows </a></li>
50        </ol>
51      </li>
52      <li><a href="#mozTocId786906">Examples</a></li>
53      <li><a href="#mozTocId166213">Downloads</a></li>
54      <li><a href="#mozTocId633593">To do </a></li>
55    </ol>
56  </li>
57</ol>
58<h2><a class="mozTocH2" name="mozTocId812196"></a>Introduction</h2>
59The <span style="font-weight: bold;">sdparm</span> utility accesses
60SCSI device parameters. When the SCSI device is
61a disk, <span style="font-weight: bold;">sdparm</span>'s role is
62similar
63to its namesake: the Linux <span style="font-weight: bold;">hdparm</span>
64utility which is primarily designed for ATA disks that had device names
65starting
66with
67"hd".
68More generally <span style="font-weight: bold;">sdparm</span> can be
69used to output and modify parameters on any device that uses a SCSI
70command set. Apart from SCSI disks, such devices include CD/DVD drives
71(irrespective of transport), SCSI and ATAPI tape drives and SCSI
72enclosures. A small set of commands associated with starting and
73stopping the media, loading and unloading removable media and some
74other housekeeping functions can also
75be sent with this utility.<br>
76<br>
77This utility currently contains over 500 entries spread across generic
78mode pages, transport specific mode pages, vendor specific mode pages,
79Vital Product Data (VPD) pages and their fields. Rather than try
80and document all of these here (or in the man page), another approach
81is taken. This utility's internal tables can be searched and output
82with the '<span style="font-family: monospace;">--enumerate</span>'
83option. Additional explanatory information is output when the '<span
84 style="font-family: monospace;">--long</span>' option is used (and
85more if the '<span style="font-family: monospace;">--long</span>'
86option is used twice).<br>
87<br>
88The information in this page corresponds to <span
89 style="font-weight: bold;">sdparm</span> version 1.02 . This utility
90was originally written for Linux and now has been ported to FreeBSD,
91Solaris, Tru64, and Windows.<br>
92<h2><a class="mozTocH2" name="mozTocId783733"></a>SCSI mode pages</h2>
93Mode pages hold meta data about a SCSI device which can, in some cases,
94be changed by the user. In SCSI parlance the "device" is a <span
95 style="font-style: italic;">logical unit</span>
96of which there may be several in a SCSI <span
97 style="font-style: italic;">target</span>. In the case of a SCSI
98disk connected directly to a Host Bus Adapter (HBA) the disk is both a
99SCSI target and a logical unit. The "user" in this case is the person
100using <span style="font-weight: bold;">sdparm</span> which is a SCSI
101"application client" and it feeds commands into a SCSI <span
102 style="font-style: italic;">initiator</span>. The
103SCSI initiator is found in the HBA. At the command level SCSI is a
104client-server protocol with the logical unit (or target device) being
105the server that responds to commands sent by the <span
106 style="font-style: italic;">application client</span> via
107the SCSI initiator.<br>
108<br>
109Mode pages are defined in SCSI (draft) standards found at <a
110 href="http://www.t10.org/">www.t10.org</a> . Mode pages common to all
111SCSI devices are found in the SCSI Primary Commands document (SPC-4)
112while those specific to block devices
113(e.g. disks) are found in SBC-3 and those for CD/DVD drives are found
114in MMC-5. This <a href="http://www.t10.org/scsi-3.htm">diagram</a>
115shows how various SCSI and associated standards interrelate.<br>
116<br>
117Below is a representation of the control mode page taken from
118SPC-3 (draft revision 23). The page is 12 bytes long with bytes
119numbered from 0 to 11. The bits within each byte are numbered from 0 to
1207 (with 0 on the right and 7 on the left). Note that some fields occupy
121a single bit, others multiple bits,
122while the last two fields occupy two bytes (i.e. 16 bits) each.<br>
123<br>
124<img style="width: 528px; height: 268px;"
125 alt="control mode page representation" src="control_mode_page.jpg"
126 align="top"><br>
127<br>
128Often
129device product manuals detail precisely which mode pages (and parts
130thereof) are supported by a particular model and describe the way that
131the
132device will react if the generic description in the SCSI (draft)
133standard needs amplification. There are also transport protocol
134specific mode pages for transports such as "spi" (the 25 year old SCSI
135Parallel Interface), "fcp" (Fibre Channel Protocol) and "sas" (Serial
136Attached SCSI). There are also vendor specific mode pages. Mode pages
137that are <span style="font-style: italic;">not</span> transport
138protocol specific or vendor specific are sometimes referred to as
139"generic" in <span style="font-weight: bold;">sdparm</span>'s
140documentation.<br>
141<br>
142To see a list of generic mode page names that <span
143 style="font-weight: bold;">sdparm</span> has some information about
144use: '<span style="font-family: monospace;">sdparm -e</span>'. To see a
145list of transport specific mode page names
146that <span style="font-weight: bold;">sdparm</span> has some
147information about
148use (for example) '<span style="font-family: monospace;">sdparm -e -t
149sas</span>'. Both lists are sorted
150alphabetically by mode page abbreviation.<br>
151<br>
152The majority of mode pages are fixed length, like the control mode page
153shown above. There are some mode pages that are variable length,
154typically with a fixed header at the top of the mode page (often 8
155bytes long) followed by a variable number of descriptors. The
156descriptors themselves may be either be fixed length or contain a
157length field.<br>
158<br>
159Mode pages are not the only mechanism in SCSI devices for holding
160meta data. Information which seldom if ever changes for a particular
161device may be found in the Vital Product Data (VPD) pages which are
162obtained via the SCSI INQUIRY command. Performance statistics are held
163in log pages which are obtained via the SCSI LOG SENSE command. Recent
164CD/DVD drives hold a lot of information in feature and profile
165descriptors (see MMC-4 and MMC-5) which are accessed via the SCSI GET
166CONFIGURATION command (see the <span style="font-weight: bold;">sg_get_config</span>
167utility in the <a href="sg3_utils.html">sg3_utils</a>
168package).<br>
169<br>
170Each mode page has up to four tables associated with it. These can be
171thought of like tabs on a spreadsheet, with each tab containing the
172same
173size table. The four tables are:<br>
174<ul>
175  <li>current values: those values that are active at this time</li>
176  <li>changeable values: bit masks showing those values that the user
177may change</li>
178  <li>default values: the manufacturer's default values</li>
179  <li>saved values: those values that will be active <span
180 style="font-style: italic;">after</span> the next power cycle (or
181format)</li>
182</ul>
183The saved values are optional. If the mask in the changeable values
184indicates a field can be changed then the corresponding field in the
185current values may be changed. A bit of 0 in the changeable values mask
186indicates the corresponding
187bit in the current values (and saved values) may <span
188 style="font-style: italic;">not</span> be changed. A bit of 1 in the
189changeable
190values mask indicates the corresponding bit in the current values (and
191saved values) may be changed. At the point when a current value is
192changed, the user may also choose to change the corresponding saved
193value. <br>
194<br>
195The manufacturer obviously knows a lot about the characteristics of its
196devices. Hence if a current field value (and saved field value) is
197different from the default field value then there should be some
198rationale.<br>
199<br>
200Some current values represent a state within the target device or
201logical unit. If that state changes so does the current value. Such
202values are not usually changeable by the user.<br>
203<br>
204The <span style="font-weight: bold;">sdparm</span> utility has a
205'<span style="font-family: monospace;">--get</span>', '<span
206 style="font-family: monospace;">--set</span>', '<span
207 style="font-family: monospace;">--clear</span>' type of command
208line interface in which mode page fields are identified by an
209acronym_name.
210In many cases these acronym_names will correspond precisely to the
211standard
212(e.g. "WCE" for Writeback Cache Enable in the caching mode page of
213SBC-3).
214For some longer fields the standards "spell out" a field name (e.g.
215"Write Retention Priority" in the caching mode page of SBC-3). In such
216cases the <span style="font-weight: bold;">sdparm</span> utility uses
217an acronym_name (e.g. "WRP"). In <span style="font-weight: bold;">sdparm</span>,
218acronyms&nbsp;<span style="font-weight: bold;"></span>across all
219generic mode pages are unique
220(i.e. an acronym matches at most one field of
221one generic mode page). Each transport protocol has its own namespace
222of acronyms so that an acronym is unique within a transport protocol.
223By default, saved values are
224not changed by '<span style="font-family: monospace;">--set</span>' and
225'<span style="font-family: monospace;">--clear</span>'. When changing
226the current values,
227the saved values can be changed as well by adding
228the '<span style="font-family: monospace;">--save</span>'. All the
229current values in a mode page
230can be changed back
231to the manufacturer's defaults with the '<span
232 style="font-family: monospace;">--defaults</span>' option (and the
233'<span style="font-family: monospace;">--save</span>' option here will
234additionally change the saved values back to
235the manufacturer's defaults).<br>
236<br>
237For mode pages that are variable length, fields that are in the header
238section or the first descriptor appear as normal. For example the "PID"
239(phy identifier) field in the first descriptor of the SAS phy control
240and discover mode page appears as is (e.g. '<span
241 style="font-family: monospace;">--get PID</span>'). The same field in
242subsequent descriptors is addressed by a
243"&lt;acronym&gt;.&lt;desc_num&gt;" format. Hence that field in the
244second descriptor is named "PID.1" and if there is a third descriptor
245the corresponsing acronym_name will be "PID.2 ". So the
246"&lt;desc_num&gt;" is origin zero and is assumed to be 0 if not given.<br>
247<br>
248Changing some mode page fields is like jumping off a cliff holding
249onto a rope which you are not sure is properly secured.&nbsp; If in
250doubt, change the current value without using the '<span
251 style="font-family: monospace;">--save</span>' option. That
252way if the setting is disastrous, power cycling the device will
253restore the previous setting. Once the new setting is known to be safe,
254then the <span style="font-weight: bold;">sdparm</span> utility can be
255re-executed with the '<span style="font-family: monospace;">--save</span>'
256option
257added.<br>
258<h2><a class="mozTocH2" name="mozTocId968100"></a>VPD pages</h2>
259Vital Product Data (VPD) pages are fetched with the SCSI INQUIRY
260command. While support for a "standard" INQUIRY response is mandatory,
261support for VPD page has been optional in the past. SPC-2 (which became
262a
263standard in 2001) and SPC-3 (ANSI INCITS 408-2005) made support
264for the "Device Identification" and the "Supported
265VPD pages" VPD pages mandatory. A utility like <span
266 style="font-weight: bold;">sdparm</span> should be able to
267send an INQUIRY command and get a valid response when the target device
268or logical unit is in almost any state. SCSI devices are not required
269to respond to mode pages accesses when the device is in any state For
270example,
271often disk drives will not allow mode pages to be accessed or changed
272when
273the disk is spun down.<br>
274<br>
275VPD pages are read only and in some situations may not be available
276(e.g. if the media is spun down or not present). Even in such cases the
277INQUIRY command should still respond with perhaps zero in the affected
278fields. VPD pages tend to have a variable number
279of descriptors rather than a predictable size with parameters in known
280positions such as most mode pages. A VPD page number can be selected
281with the '<span style="font-family: monospace;">--page=</span>' option.
282If only the '<span style="font-family: monospace;">--inquiry</span>'
283option is given
284(without a '<span style="font-family: monospace;">--page=</span>'
285option) then the Device Identification
286VPD
287page (page number 0x83 or abbreviation "di") is assumed. If both the
288'<span style="font-family: monospace;">--inquiry</span>' and '<span
289 style="font-family: monospace;">--all</span>' options are given
290(without a '<span style="font-family: monospace;">--page=</span>'
291option)
292then the Supported VPD pages VPD page (page number 0x0 or abbreviation
293"sv") is assumed.<br>
294<br>
295The device
296identification page usually contains multiple designators. Each
297designator belongs to one of three associations. The SCSI Architectural
298Model (see SAM-3 at <a href="http://www.t10.org/">www.t10.org</a>) may
299help in explaining these associations. The associations are:<br>
300<ul>
301  <li>addressed <span style="font-style: italic;">logical unit</span></li>
302  <li><span style="font-style: italic;">target device port</span>
303(that, in most cases,
304received the request)</li>
305  <li><span style="font-style: italic;">target device</span> containing
306addressed logical unit</li>
307</ul>
308Any designators found are grouped in the order of the above list. If
309there are no designators of a given type of association then the
310heading for that association is not output. Each association can be
311listed individually with the
312"di_lu", "di_port" and "di_target" acronyms. For debugging there is
313another acronym: "di_asis" which outputs designators in the order they
314are found in the device
315identification page.<br>
316<br>
317Here are some of the VPD pages that are currently decoded (listed in
318page number order):<br>
319<ul>
320  <li>Supported VPD pages [page 0x0]; page abbreviation: "sv". Contains
321a list of VPD pages supported by given device.<br>
322  </li>
323  <li>Unit serial number [page 0x80]; page abbreviation: "sn". This is
324a vendor specific (vendor format) serial number.<br>
325  </li>
326  <li>Device identification [page 0x83]; default, page abbreviation:
327"di". Contains designators for the addressed logical unit, target
328device and target port. These can be listed individually with the
329"di_lu", "di_port" and "di_target" acronyms. Use "di_asis" to show all
330designators in the order they are found. Add '--quiet' option to reduce
331the amount of output, leaving mainly naa-5 and EUI identifiers.<br>
332  </li>
333  <li>Software Interface Identification; [page 0x84], one or more
334EUI-48 identifiers that can be used to define more precisely the
335peripheral device type.<br>
336  </li>
337  <li>Management network addresses: [page 0x85], page abbreviation:
338"mna". Contains a list of network addresses of associated management
339services.<br>
340  </li>
341  <li>Extended inquiry: [page 0x86], page abbreviation:
342"ei". The standard INQUIRY response is full, so further options that
343don't fit into other pages are placed here.<br>
344  </li>
345  <li>Mode page policy: [page 0x87], page abbreviation:
346"mpp". Contains a list of supported mode pages and their associated
347policy (e.g. for a dual ported disk, mode pages can be per target port
348or shared).<br>
349  </li>
350  <li>SCSI Ports [page 0x88]; page abbreviation: "sp". For dual ported
351devices (e.g. SAS and FCP disks), contains all port addresses (not just
352the one being used for this access).<br>
353  </li>
354  <li>ATA Information [page 0x89 (SAT)]; page abbreviation: "ai".
355Defined by the SCSI to ATA Translation (SAT) draft standard. Contains
356IDENTIFY (PACKET) DEVICE ATA command response and some related
357information.<br>
358  </li>
359  <li>Block limits [page 0xb0 (SBC)]; page abbreviation: "bl". Defines
360maximum and optimal number of blocks to transfer in a single SCSI
361command (either a READ or WRITE command)</li>
362  <li>Block device characteristics [page 0xb1 (SBC)]; page abbreviation
363"bdc". Contains the rotating media revolutions per minute (rpm) where
364relevant.<br>
365  </li>
366</ul>
367VPD pages for which <span style="font-weight: bold;">sdparm</span>
368does <span style="font-style: italic;">not</span> hold decoding
369information (e.g. '<span style="font-family: monospace;">--page=82h</span>')
370are output
371in ASCII hex, assuming the device responds. VPD page abbreviations can
372be listed with '<span style="font-family: monospace;">sdparm
373--enumerate --inquiry</span>'.<br>
374<br>
375The sg3_utils package contains a utility
376called <span style="font-weight: bold;">sg_vpd</span> that overlaps
377with <span style="font-weight: bold;">sdparm</span>'s VPD
378capabilities. Additionally <span style="font-weight: bold;">sg_vpd</span>
379decodes various
380vendor specific VPD pages.<br>
381<h2><a class="mozTocH2" name="mozTocId592219"></a>sdparm commands</h2>
382The '<span style="font-family: monospace;">--command=</span>' option
383allows a command to be sent to the given
384device. The currently supported commands are:
385<ul>
386  <li><span style="font-weight: bold;">capacity</span>: sends a READ
387CAPACITY and if successful reports the
388number of blocks, block length and capacity expressed in MibiBytes
389(1048576 bytes). Valid for disks and CD/DVD drives with the appropriate
390media loaded.<br>
391  </li>
392  <li><span style="font-weight: bold;">eject</span>: stops the medium
393(if it is spinning) and ejects it from
394the drive. Note that this may be prevented by software in which case
395use the 'unlock' command first.</li>
396  <li><span style="font-weight: bold;">load</span>: loads the medium
397and then spins it up</li>
398  <li><span style="font-weight: bold;">ready</span>: reports whether
399the medium is ready for IO. Ready usually
400means that it is present and spun up. If the device is not ready then
401the exit status will be 2 (see <a href="sdparm.html#mozTocId675268">exit
402status</a>
403section below).<br>
404  </li>
405  <li><span style="font-weight: bold;">sense</span>: reports sense data
406(from a REQUEST SENSE SCSI command);
407can include power condition information, a progress indication for a
408time consuming command (e.g. format) or a report an informational
409exception (when
410MRIE=6)<br>
411  </li>
412  <li><span style="font-weight: bold;">start</span>: spin up the medium</li>
413  <li><span style="font-weight: bold;">stop</span>: spin down the medium</li>
414  <li><span style="font-weight: bold;">sync</span>: send a SYNCHRONIZE
415CACHE SCSI command to the device.<br>
416  </li>
417  <li><span style="font-weight: bold;">unlock</span>: instructs the
418device to allow medium removal (i.e. an
419eject). Beware, the OS may have had a good reason for preventing
420removal of the medium (e.g. it contains a mounted file system). Use at
421your own risk.<br>
422  </li>
423</ul>
424These <span style="font-weight: bold;">sdparm</span> commands send
425SCSI commands to the given <span style="font-style: italic;">DEVICE</span>.
426If they
427don't seem to work, adding a verbose flag (i.e. '<span
428 style="font-family: monospace;">-v</span>' or '<span
429 style="font-family: monospace;">-vv</span>') may
430provide more information. The "ready" and "sense" commands need read
431permissions on
432the <span style="font-style: italic;">DEVICE</span> while the other
433commands need both read and write
434permissions.<br>
435<h2><a class="mozTocH2" name="mozTocId683013"></a>sdparm syntax</h2>
436<span style="font-weight: bold;">sdparm</span> is a command line
437utility which takes the following form:<br>
438<span style="font-family: monospace;">sdparm [OPTIONs] <span
439 style="font-style: italic;">DEVICE<br>
440</span></span><br>
441There are zero or more options usually followed by a <span
442 style="font-style: italic;">DEVICE</span>
443name. Only invocations that use the '<span
444 style="font-family: monospace;">--enumerate</span>' or '<span
445 style="font-family: monospace;">--wscan</span>' option do not need
446a <span style="font-style: italic;">DEVICE</span> name. Invocations
447with a <span style="font-style: italic;">DEVICE</span> name and no
448options will check
449that device for mode pages in which there are "common" parameters (mode
450page fields). Common parameters are a somewhat arbitrary subset of the
451hundreds of parameters available.<br>
452<br>
453Options have either a long format, as shown in the first column below,
454or a short format, as shown in the second column. Either format can be
455used. Note that long options that take an argument (e.g. '<span
456 style="font-family: monospace;">--get=WCE</span>')
457use an equal sign ("=") as a separator while the corresponding short
458options use a space
459(or nothing) as a separator (e.g. '<span style="font-family: monospace;">-g
460WCE</span>'). Short options can be
461elided, hence '<span style="font-family: monospace;">-al</span>' is
462equivalent to '<span style="font-family: monospace;">--all --long</span>'.<br>
463&nbsp;<br>
464<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
465 cellspacing="2">
466  <caption><span style="font-weight: bold;">Table 1. sdparm command
467line options</span><br>
468  </caption> <tbody>
469    <tr>
470      <td style="vertical-align: top;"><span style="font-weight: bold;">long
471option format</span><br>
472      </td>
473      <td style="vertical-align: top;"><span style="font-weight: bold;">short
474option format</span><br>
475      </td>
476      <td style="vertical-align: top;"><span style="font-weight: bold;">description</span><br>
477      </td>
478    </tr>
479    <tr>
480      <td style="vertical-align: top;">--all<br>
481      </td>
482      <td style="vertical-align: top;">-a<br>
483      </td>
484      <td style="vertical-align: top;">list all known (generic or
485transport) parameters for
486given <span style="font-style: italic;">DEVICE</span>. When this
487utility is invoked with no options then only
488common generic mode parameters are output.<br>
489      </td>
490    </tr>
491    <tr>
492      <td style="vertical-align: top;">--clear=<span
493 style="font-style: italic;">STR</span><br>
494      </td>
495      <td style="vertical-align: top;">-c <span
496 style="font-style: italic;">STR</span><br>
497      </td>
498      <td style="vertical-align: top;">clear (zero) parameter(s) in <span
499 style="font-style: italic;">STR</span>. The default action to clear
500can be overridden, see below.<br>
501      </td>
502    </tr>
503    <tr>
504      <td style="vertical-align: top;">--command=<span
505 style="font-style: italic;">CMD</span><br>
506      </td>
507      <td style="vertical-align: top;">-C <span
508 style="font-style: italic;">CMD</span><br>
509      </td>
510      <td style="vertical-align: top;">perform <span
511 style="font-style: italic;">CMD</span> which is one
512of: capacity, eject, load, ready, sense, start, stop, sync or unlock<br>
513      </td>
514    </tr>
515    <tr>
516      <td style="vertical-align: top;">--dbd<br>
517      </td>
518      <td style="vertical-align: top;">-B<br>
519      </td>
520      <td style="vertical-align: top;">set the DBD (disable block
521descriptors) bit in each MODE SENSE cdb<br>
522      </td>
523    </tr>
524    <tr>
525      <td style="vertical-align: top;">--defaults<br>
526      </td>
527      <td style="vertical-align: top;">-D<br>
528      </td>
529      <td style="vertical-align: top;">fetch the default values for the
530given mode page and use them to overwrite the current values. Note that
531the saved values are not overwritten unless the '--save' option is also
532given.<br>
533      </td>
534    </tr>
535    <tr>
536      <td style="vertical-align: top;">--dummy<br>
537      </td>
538      <td style="vertical-align: top;">-d<br>
539      </td>
540      <td style="vertical-align: top;">when used with '<span
541 style="font-family: monospace;">--set</span>' or
542'<span style="font-family: monospace;">--clear</span>' does all the
543preparation and sanity checks but bypasses the
544final
545stage of sending the changes to the device. [That is, it skips the MODE
546SELECT
547command.]<br>
548      </td>
549    </tr>
550    <tr>
551      <td style="vertical-align: top;">--enumerate<br>
552      </td>
553      <td style="vertical-align: top;">-e<br>
554      </td>
555      <td style="vertical-align: top;">fetch information from the
556sdparm's internal tables. If a <span style="font-style: italic;">DEVICE</span>
557name is given then it will
558be ignored. May be used in conjunction with '<span
559 style="font-family: monospace;">--all</span>', '<span
560 style="font-family: monospace;">--inquiry</span>',
561'<span style="font-family: monospace;">--long</span>',&nbsp;
562'<span style="font-family: monospace;">--page=</span>',&nbsp; '<span
563 style="font-family: monospace;">--transport=</span>' and/or '<span
564 style="font-family: monospace;">--vendor=</span>'.<br>
565      </td>
566    </tr>
567    <tr>
568      <td style="vertical-align: top;">--flexible<br>
569      </td>
570      <td style="vertical-align: top;">-f<br>
571      </td>
572      <td style="vertical-align: top;">check mode sense responses for
573sanity and if broken, try to fix them if possible. Also allows mode
574pages whose peripheral type mismatches the given <span
575 style="font-style: italic;">DEVICE</span> to be processed.<br>
576      </td>
577    </tr>
578    <tr>
579      <td style="vertical-align: top;">--get=<span
580 style="font-style: italic;">STR</span><br>
581      </td>
582      <td style="vertical-align: top;">-g <span
583 style="font-style: italic;">STR</span><br>
584      </td>
585      <td style="vertical-align: top;">fetch parameter(s) in <span
586 style="font-style: italic;">STR</span><br>
587      </td>
588    </tr>
589    <tr>
590      <td style="vertical-align: top;">--help<br>
591      </td>
592      <td style="vertical-align: top;">-h<br>
593      </td>
594      <td style="vertical-align: top;">output a usage message then exits<br>
595      </td>
596    </tr>
597    <tr>
598      <td style="vertical-align: top;">--hex<br>
599      </td>
600      <td style="vertical-align: top;">-H<br>
601      </td>
602      <td style="vertical-align: top;">rather than decode a (mode or
603VPD) page, it is output in ASCII hex. If used with the '<span
604 style="font-family: monospace;">--get</span>' option
605then the parameter is output in hexadecimal. May be invoked multiple
606times.<br>
607      </td>
608    </tr>
609    <tr>
610      <td style="vertical-align: top;">--inquiry<br>
611      </td>
612      <td style="vertical-align: top;">-i<br>
613      </td>
614      <td style="vertical-align: top;">fetch a VPD page, decode and
615output it. If no '<span style="font-family: monospace;">--page=</span>'
616is given then the device identification VPD
617page is fetched.&nbsp; Add '<span style="font-family: monospace;">-ll</span>'
618to get standard INQUIRY response data
619decoded in more detail.<br>
620      </td>
621    </tr>
622    <tr>
623      <td style="vertical-align: top;">--long<br>
624      </td>
625      <td style="vertical-align: top;">-l<br>
626      </td>
627      <td style="vertical-align: top;">Add extra information to the
628output. For example a line showing the setting of the WCE parameter
629will have "Write cache enable" appended to it. Using '<span
630 style="font-family: monospace;">-ll</span>' adds
631information about selected mode parameter values (e.g. MRIE).<br>
632      </td>
633    </tr>
634    <tr>
635      <td style="vertical-align: top;">--num-desc<br>
636      </td>
637      <td style="vertical-align: top;">-n<br>
638      </td>
639      <td style="vertical-align: top;">for a mode page that can have
640descriptors, the number of descriptors in the given page on DEVICE is
641output. Otherwise 0 is output.<br>
642      </td>
643    </tr>
644    <tr>
645      <td style="vertical-align: top;">--page=<span
646 style="font-style: italic;">PG</span>[,<span
647 style="font-style: italic;">SPG</span>]<br>
648      </td>
649      <td style="vertical-align: top;">-p<span
650 style="font-style: italic;"> PG</span>[,<span
651 style="font-style: italic;">SPG</span>]<br>
652      </td>
653      <td style="vertical-align: top;">page (and optionally subpage) to
654output or change. Argument may be either an abbreviation, a number or
655two numbers separated by a comma. If a number is
656prefixed by "0x" or has a trailing "h" then it is decoded as
657hexadecimal. When a numeric
658argument is given, it is assumed to be for a mode page unless the
659'<span style="font-family: monospace;">--inquiry</span>' option is also
660given. An abbreviation is
661two or three lower case letters (e.g. "ca" for the caching mode page).
662An
663abbreviation may be for a mode page (e.g. "ca")&nbsp; or a VPD page
664(e.g. "sp").<br>
665      </td>
666    </tr>
667    <tr>
668      <td style="vertical-align: top;">--quiet<br>
669      </td>
670      <td style="vertical-align: top;">-q<br>
671      </td>
672      <td style="vertical-align: top;">suppress vendor/product/revision
673strings that are usually the first line of the output. Also abridges
674the output of the device identification VPD page.<br>
675      </td>
676    </tr>
677    <tr>
678      <td style="vertical-align: top;">--save<br>
679      </td>
680      <td style="vertical-align: top;">-S<br>
681      </td>
682      <td style="vertical-align: top;">also write changes to
683corresponding "saved" values mode page. Active when used with '<span
684 style="font-family: monospace;">--set=</span>',
685'<span style="font-family: monospace;">--clear=</span>' or '<span
686 style="font-family: monospace;">--defaults</span>'. The default action
687is to only
688make
689changes to the current values mode page.<br>
690      </td>
691    </tr>
692    <tr>
693      <td style="vertical-align: top;">--set=<span
694 style="font-style: italic;">STR</span><br>
695      </td>
696      <td style="vertical-align: top;">-s <span
697 style="font-style: italic;">STR</span><br>
698      </td>
699      <td style="vertical-align: top;">set parameter(s) in <span
700 style="font-style: italic;">STR</span>. To set a parameter is to make
701all its bits one. The
702default action to set can be overridden, see below. </td>
703    </tr>
704    <tr>
705      <td style="vertical-align: top;">--six<br>
706      </td>
707      <td style="vertical-align: top;">-6<br>
708      </td>
709      <td style="vertical-align: top;">use 6 byte cdbs for MODE SENSE
710and MODE SELECT commands for getting and setting mode pages. The
711default action is to use the 10 byte cdb variants.<br>
712      </td>
713    </tr>
714    <tr>
715      <td style="vertical-align: top;">--transport=<span
716 style="font-style: italic;">TN</span><br>
717      </td>
718      <td style="vertical-align: top;">-t <span
719 style="font-style: italic;">TN</span><br>
720      </td>
721      <td style="vertical-align: top;">transport protocol identifier;
722either a number or an abbreviation (e.g. "fcp", "spi" or "sas") can be
723given. See <a href="#mozTocId808937">transports</a> section. In the
724absence of an explicit transport and if a page or field name does not
725match a generic name then the SAS transport is assumed.<br>
726      </td>
727    </tr>
728    <tr>
729      <td style="vertical-align: top;">--vendor=<span
730 style="font-style: italic;">VN</span><br>
731      </td>
732      <td style="vertical-align: top;">-M <span
733 style="font-style: italic;">VN</span><br>
734      </td>
735      <td style="vertical-align: top;">vendor (manufacturer)
736identifier; either a number or an abbreviation (e.g. "sea" or "hit")
737can be given. See <a href="#mozTocId378082">vendors</a> section.<br>
738      </td>
739    </tr>
740    <tr>
741      <td style="vertical-align: top;">--verbose<br>
742      </td>
743      <td style="vertical-align: top;">-v<br>
744      </td>
745      <td style="vertical-align: top;">increase verbosity of output.
746May be used multiple times to further increase verbosity.<br>
747      </td>
748    </tr>
749    <tr>
750      <td style="vertical-align: top;">--version<br>
751      </td>
752      <td style="vertical-align: top;">-V<br>
753      </td>
754      <td style="vertical-align: top;">print out the version and the
755date of last code change then exits<br>
756      </td>
757    </tr>
758    <tr>
759      <td style="vertical-align: top;">--wscan<br>
760      </td>
761      <td style="vertical-align: top;">-w<br>
762      </td>
763      <td style="vertical-align: top;">[<span
764 style="text-decoration: underline;">Windows only</span>] scan for
765device
766names, show one device per line. Each device can have multiple device
767names. If a <span style="font-style: italic;">DEVICE</span> name is
768given (on the command line) then it will
769be ignored. </td>
770    </tr>
771  </tbody>
772</table>
773<br>
774If neither '<span style="font-family: monospace;">--transport=</span>'
775nor '<span style="font-family: monospace;">--vendor=</span>' options
776are given for mode page related operations then generic mode pages and
777fields are checked first for matches. If there is no match then the SAS
778transport is checked. This means that in most cases the '<span
779 style="font-family: monospace;">--transport=sas</span>' option is not
780required when accessing SAS mode pages and fields.<br>
781<br>
782The '<span style="font-family: monospace;">--clear=</span>', '<span
783 style="font-family: monospace;">--get=</span>' and '<span
784 style="font-family: monospace;">--set=</span>' options require a
785"<span style="font-style: italic;">STR</span>" argument.&nbsp;
786The <span style="font-style: italic;">STR</span> argument is a comma
787separated list of acronyms or numeric descriptors. Each acronym or
788numeric descriptor can optionally be followed by "=&lt;value&gt;". The
789"&lt;value&gt;" is assumed to be decimal unless prefixed by "0x" or has
790a trailing "h".
791Numeric descriptors are three numbers separated by colons of the form:
792"&lt;start_byte&gt;:&lt;start_bit&gt;:&lt;num_of_bits&gt; . The
793&lt;start_byte&gt; begins at zero; the &lt;start_bit&gt; is 7 for the
794most significant bit (msb) and 0 for the least significant bit; while
795the
796&lt;num_of_bits&gt; should be a value between 1 and 64 inclusive. <br>
797<br>
798For '<span style="font-family: monospace;">--clear=</span>' and '<span
799 style="font-family: monospace;">--set=</span>' the optional
800"&lt;value&gt;" is the
801unsigned integer
802value to set that parameter to (e.g. '<span
803 style="font-family: monospace;">--set=MRIE=6</span>'). The
804"&lt;value&gt;" of -1 is a special
805case in which all the bits in the parameter are set to one. For a
806'<span style="font-family: monospace;">--set=</span>' option the
807default action (in the absence of
808"=&lt;value&gt;") is the same as "=-1". For a '<span
809 style="font-family: monospace;">--clear=</span>' option the
810default action (in the absence of "=&lt;value&gt;") is the same as
811"=0". <br>
812<br>
813If <span style="font-weight: bold;">sdparm</span> is used to change
814parameters and that operation succeeds (or at least no error is
815reported) then only standard INQUIRY response information (i.e. vendor,
816model and revision) is output
817and the <span style="font-weight: bold;">sdparm</span> completes with
818an exit status value of 0. If required the standard INQUIRY response
819information (i.e. vendor,
820model and revision) output can be suppressed with the '<span
821 style="font-family: monospace;">--quiet</span>' option.
822If <span style="font-weight: bold;">sdparm</span>
823is used to change parameters and that operation fails then error
824information is output (usually to stderr) and the <span
825 style="font-weight: bold;">sdparm</span> completes with a non-zero
826exit status value(see <a href="#mozTocId675268">exit status</a>
827section).<br>
828<br>
829For '<span style="font-family: monospace;">--get=</span>' the
830"&lt;value&gt;" is not normally given. If given then
831it is interpreted as a formatting instruction for which the value of 0
832is the default. For mode pages the default format for '<span
833 style="font-family: monospace;">--get=</span>' is the
834acronym followed by the current value and then the changeable, default
835and saved values in brackets. If a value of 1 is given then only the
836acronym followed by the current value are output.<br>
837<br>
838The '<span style="font-family: monospace;">--enumerate</span>' option
839ignores the given device name (if provided)
840and
841outputs information from the tables within the <span
842 style="font-weight: bold;">sdparm</span> utility. With no other
843options provided, mode page abbreviations followed by their full names
844are
845output. If the '<span style="font-family: monospace;">--inquiry</span>'
846option is also given the VPD page
847abbreviations followed by their full names are output. If the
848'<span style="font-family: monospace;">--enumerate --page=</span>'
849options are given then within the selected mode
850page, the name of each known acronym, its numeric descriptor and its
851full name is output. More information about some mode page fields is
852supplied when additional '<span style="font-family: monospace;">--long
853--long</span>' options are given.<br>
854<h2><a class="mozTocH2" name="mozTocId675268"></a>Exit status</h2>
855Each process containing the <span style="font-weight: bold;">sdparm</span>
856utility completes
857with an exit status 0 when
858successful. Prior to version 0.99 all errors yielded an exit status of
8591. From version 1.00 the non zero exit status values are:<br>
860<ul>
861  <li><span style="font-weight: bold;">1</span>&nbsp;&nbsp; syntax
862error in command line options or their arguments, or an illegal
863combination of options.</li>
864  <li><span style="font-weight: bold;">2</span>&nbsp;&nbsp; the <span
865 style="font-style: italic;">DEVICE</span>
866reports that it is not ready for the operation requested. The <span
867 style="font-style: italic;">DEVICE</span>
868may be in the process of becoming ready (e.g. spinning up but not at
869speed) so <span style="font-weight: bold;">sdparm</span> may work
870after a wait.</li>
871  <li><span style="font-weight: bold;">3</span>&nbsp;&nbsp; the <span
872 style="font-style: italic;">DEVICE</span>
873reports a medium or hardware error (or a blank check).<br>
874  </li>
875  <li><span style="font-weight: bold;">5</span>&nbsp;&nbsp; the <span
876 style="font-style: italic;">DEVICE</span>
877reports an "illegal request" with an additional sense code other than
878"invalid operation code". This is often a supported command with a
879field set requesting an unsupported capability. <br>
880  </li>
881  <li><span style="font-weight: bold;">6</span>&nbsp;&nbsp; the <span
882 style="font-style: italic;">DEVICE</span>
883reports a "unit attention" condition. This usually indicates that
884something unrelated to the requested command has occurred (e.g. a
885device reset) potentially before the current SCSI command was sent. The
886requested command has not been executed by the <span
887 style="font-style: italic;">DEVICE</span>. Note that unit
888attention conditions are usually only reported once by a device.</li>
889  <li><span style="font-weight: bold;">9</span>&nbsp;&nbsp; the <span
890 style="font-style: italic;">DEVICE</span>
891reports an illegal request with an additional sense code of "invalid
892operation code" which means that it doesn't support the requested
893command.</li>
894  <li><span style="font-weight: bold;">11</span>&nbsp;&nbsp; the <span
895 style="font-style: italic;">DEVICE</span>
896reports an aborted command. In some cases this can be caused by
897congestion on the transport and trying again may be successful.<br>
898  </li>
899  <li><span style="font-weight: bold;">15</span> &nbsp; <span
900 style="font-weight: bold;">sdparm</span> is
901unable to open, close or use the given <span
902 style="font-style: italic;">DEVICE</span>. The given file name
903could be incorrect or there may be permission problems. Adding the '<span
904 style="font-family: monospace;">-v</span>'
905option may give more information.</li>
906  <li><span style="font-weight: bold;">20</span>&nbsp;&nbsp; the <span
907 style="font-style: italic;">DEVICE</span> reports it has a check
908condition but "no sense".
909Some polling commands (e.g. REQUEST SENSE) can react this way. It is
910unlikely that this value will occur as an exit status.</li>
911  <li><span style="font-weight: bold;">21</span>&nbsp;&nbsp; the <span
912 style="font-style: italic;">DEVICE</span>
913reports a "recovered error". The requested command was successful.<br>
914  </li>
915  <li><span style="font-weight: bold;">33</span>&nbsp;&nbsp; the
916command sent to the <span style="font-style: italic;">DEVICE</span>
917has timed out.</li>
918  <li><span style="font-weight: bold;">97</span>&nbsp;&nbsp; the
919response to a SCSI command failed sanity checks.</li>
920  <li><span style="font-weight: bold;">98</span>&nbsp;&nbsp; the <span
921 style="font-style: italic;">DEVICE</span>
922reports it has a check condition but the error doesn't fit into any of
923the above categories.</li>
924  <li><span style="font-weight: bold;">99</span>&nbsp;&nbsp; any errors
925that can't be categorized into values 1 to 98 may yield this value.
926This includes transport and operating system errors after the command
927has been sent to the <span style="font-style: italic;">DEVICE</span>.<br>
928  </li>
929</ul>
930Many of the above exit statuses will be repeatable so executing <span
931 style="font-weight: bold;">sdparm</span>
932again with one or more '<span style="font-family: monospace;">-v</span>'
933options may yield more information.
934Unit attentions (exit status 6) are only reported once per condition.
935Notice that some of the lower exit status values correspond to the SCSI
936sense key values that they correspond to.<br>
937<h2><a class="mozTocH2" name="mozTocId808937"></a>Transports</h2>
938There are a basically two command set families of interest for storage
939devices: those defined at <a href="http://www.t10.org">www.t10.org</a>
940("SCSI") and the ATA non-packet
941command set for disks (reference: ATA8-ACS at <a
942 href="http://www.t13.org">www.t13.org</a> ). Transports <span
943 style="font-style: italic;">carry</span> commands and associated data
944across
945some interconnect. Examples of transports are PATA (parallel ATA),
946SATA, SPI, SAS, FCP, USB and IP (for iSCSI). The ATA transports have a
947pass-through interface for carrying packet oriented command sets and
948that is called ATAPI. ATAPI is used almost exclusively to carry SCSI
949command sets (e.g. MMC for CD/DVD drives). SAS and FCP are considered
950"SCSI" transports yet they can also carry (or tunnel) the ATA
951non-packet command set for disks as well as other non-SCSI protocols.<br>
952<br>
953Should we name devices in an operating system by transport or command
954set? That is a
955difficult question since transports can be bridged (or tunnelled) while
956command sets can be translated.&nbsp; Linux has instances of both
957transport and
958command set device naming. Awkward examples can be found of both:<br>
959<ul>
960  <li>/dev/hdc could be an ATAPI DVD drive connected via a parallel ATA
961ribbon cable. However it responds to very few ATA commands (those for
962identification and transport characteristics); at the command set level
963it is a "SCSI" device using the Multi Media Command (MMC) set.</li>
964  <li>/dev/sda could be a Compact Flash card, plugged into a USB
965multi-card reader which is connected to the computer with a USB cable.
966The device node name suggests it is a SCSI device yet its transport is
967obviously USB while the CF card itself uses a parallel ATA bus and
968command set.</li>
969</ul>
970Sometimes the command set layer is used to fetch or perhaps change
971transport characteristics of a given device (e.g. a disk at the other
972end of a cable). Alternatively the management of the transport is done
973by other protocols (e.g. IP in the case of iSCSI). Of the 9 transports
974defined in SCSI (SPC-4) only the following have
975transport (protocol) specific mode pages for transport management,
976according to current drafts:<br>
977<ul>
978  <li>Fibre channel [abbreviation "fcp"]</li>
979  <li>SCSI parallel interface [abbreviation "spi"]</li>
980  <li>SCSI Remote DMA used by InfiniBand [abbreviation "srp"]</li>
981  <li>Serial attached SCSI [abbreviation "sas"]</li>
982</ul>
983These transports all have a protocol specific Disconnect/reconnect mode
984page, and most have additional mode pages. All supported generic and
985protocol
986(i.e. transport) specific
987modes pages can be listed (enumerated) with the '<span
988 style="font-family: monospace;">--enumerate --long</span>'
989option. Mode pages for a given transport can be listed with, for
990example, the '<span style="font-family: monospace;">--enumerate
991--transport=sas</span>' option. All parameters of
992mode pages for a given transport can be listed with, for example, the
993'<span style="font-family: monospace;">--enumerate --transport=sas --all</span>'
994option.<br>
995<br>
996There are other significant "mass storage" transports that are not
997listed in
998SPC-4. See the following sections.<br>
999<h3><a class="mozTocH2" name="mozTocId926648"></a>USB</h3>
1000USB is an important transport for mass storage but little is said about
1001it in the "SCSI" standards at t10.org . Specifications
1002can be found at <a href="http://www.usb.org/developers/devclass_docs">www.usb.org/developers/devclass_docs</a>
1003under "Mass storage". There are no transport specific mode pages
1004defined for the USB
1005mass storage class. Typically a USB external disk enclosure contains a
1006parallel or serial
1007ATA disk while USB external CD/DVD drives normally contain parallel
1008ATAPI
1009devices.
1010Often there is a protocol bridge chip within a USB enclosure to do a
1011SCSI to ATA translation and in the author's experience the translation
1012is minimal. There are also USB memory keys (containing flash ram) and
1013USB Compact Flash (CF), Secure Digital (SD), etc, card readers. CF
1014cards use the ATA interface&nbsp; between the card and the reader,
1015while many other card types use proprietary interfaces. Multi card USB
1016readers tend to use SCSI LUNs for
1017sub-addressing within the multi card reader (which is exactly what LUNs
1018are designed to do).<br>
1019<br>
1020Within the USB mass storage class there is a subclass code. For disks,
1021the applicable subclasses are either Reduced Block Commands (RBC) or
1022SCSI "transparent" (i.e. SBC). The RBC standard must be the most
1023quirky standard in the
1024t10.org stable. RBC has a peculiar mode page called "RBC device
1025parameters" mode page
1026which combines parameters from several other mode pages (and the READ
1027CAPACITY SCSI command) in a rather awkward way. RBC only supports the 6
1028byte variants of MODE SENSE and MODE SELECT and requires the "disable
1029descriptor blocks" (DBD) bit to be set, both of which are at odds with
1030the
1031conventions of other t10.org standards. Since RBC can trip up the SCSI
1032disk (sd) driver, the USB mass storage driver does its own
1033translation so RBC is somewhat hidden.
1034Around Linux kernel 2.6.13 the sd driver has been corrected to handle
1035the RBC set
1036properly (mainly for IEEE 1394). This discussion suggests that the way
1037to read the RBC device
1038parameters mode page is something like '<span
1039 style="font-family: monospace;">sdparm --dbd --six --page=rbc
1040/dev/sdc</span>'; and if that fails try dropping the '<span
1041 style="font-family: monospace;">--six</span>' option.<br>
1042<br>
1043In summary, <span style="font-weight: bold;">sdparm</span> can do very
1044little with USB mass storage
1045devices. Best to start with very low expectations. Features such as
1046locking and password based access control are being discussed for USB
1047so there may be improvements in the future.<br>
1048<h3><a class="mozTocH2" name="mozTocId28143"></a>IEEE 1394</h3>
1049This is a similar technology to USB. IEEE1394 has a transport defined
1050at t10.org called SBP-2 (and a new version called SBP-3). There are no
1051transport (protocol) specific mode pages defined in SBP. SBP requires
1052the use of the Reduced Block Commands (RBC) set. The comments about RBC
1053in the <a href="#mozTocId926648">USB</a> section apply.<br>
1054<h3><a class="mozTocH2" name="mozTocId752074"></a>SATA</h3>
1055SATA disks and S-ATAPI devices (e.g. DVD drives) may appear as either
1056IDE (e.g. /dev/hda) or SCSI (e.g. /dev/scd0) devices in Linux. In some
1057cases this may depend on which hardware drivers have been chosen in the
1058kernel configuration. For SATA disks that appear as IDE devices,
1059the Linux's <span style="font-weight: bold;">hdparm</span> utility is
1060the appropriate tool. S-ATAPI devices,
1061regardless of their device node name, may find <span
1062 style="font-weight: bold;">sdparm</span> useful because
1063there is a high probability that they use a SCSI command set (e.g. MMC
1064for DVD drives).<br>
1065<br>
1066SATA disks that appear as SCSI devices (e.g. /dev/sda) may
1067have a SCSI ATA Translation (SAT) Layer (SATL) between the disk and the
1068host
1069computer. SAT recently became a standard, for more information see <a
1070 href="http://www.t10.org">www.t10.org</a>
1071. The SATL may be within the kernel (e.g. libata in Linux), in host
1072adapter firmware or in an
1073external enclosure (e.g. Fibre channel has FC to SATA translation chips
1074that include a SATL). [One reason for doing this is that the SCSI
1075protocols scale better in multi-initiator, multi-port environments
1076(e.g. SATA NCQ assumes one host).]<br>
1077<br>
1078The SAT standard defines a Vital Product Data page for fetching
1079information about ATA devices which includes the response to the
1080IDENTIFY (PACKET) DEVICE ATA command. This is the "ATA
1081Information" VPD page and has the acronym "ai" in <span
1082 style="font-weight: bold;">sdparm</span>. This page is supported
1083by several SATLs. If present, it can be viewed with <span
1084 style="font-family: monospace;">'sdparm --page=ai <span
1085 style="font-style: italic;">DEVICE</span></span>'.&nbsp;
1086The <span style="font-weight: bold;">sdparm</span> utility only
1087decodes the device identification strings from
1088the IDENTIFY (PACKET) DEVICE
1089response.&nbsp; The Linux utility <span style="font-weight: bold;">hdparm</span>
1090decodes are lot more from the
1091response. The following incantation glues the two utilities together so
1092that <span style="font-weight: bold;">hdparm</span> can decode ATA
1093information that <span style="font-weight: bold;">sdparm</span> has
1094fetched: '<span style="font-family: monospace;">sdparm --page=ai -HHH
1095/dev/sda |
1096hdparm --Istdin</span>'. Due to difficulties with the older versions
1097of <span style="font-weight: bold;">hdparm</span> this sequence may be
1098more stable: '<span style="font-family: monospace;">sdparm --page=ai
1099-HHH /dev/sda &gt; t
1100;
1101hdparm --Istdin &lt; t</span>' . <span style="font-weight: bold;">hdparm</span>
1102version 7.0 and later can detect a SATL so '<span
1103 style="font-family: monospace;">hdparm -I /dev/sda</span>' should work
1104if /dev/sda is a SATA disk or a S-ATAPI device (e.g. a CD/DVD drive).<br>
1105<br>
1106The SAT standard only defines a few fields that can be changed
1107(e.g.
1108DRA and WCE). Setting these requires either:<br>
1109<ul>
1110  <li>the ATA PASS-THROUGH SCSI commands in the SATL to be implemented,
1111or</li>
1112  <li>the MODE SELECT SCSI command in the SATL to be implemented so <span
1113 style="font-weight: bold;">sdparm</span>
1114can do it.<br>
1115  </li>
1116</ul>
1117Again linux's libata is almost, but not yet, there. Both mechanisms
1118will be
1119useful since the ATA PASS-THROUGH commands can be used by
1120utilities like <a href="http://smartmontools.sourceforge.net/">smartmontools</a>
1121while MODE SELECT is required for S-ATAPI
1122devices that use SCSI command sets (e.g. DVD drives which use MMC). If
1123the SATL implements the SCSI MODE SELECT command then <span
1124 style="font-weight: bold;">sdparm</span> can be used to change the
1125fields.<br>
1126<h2><a class="mozTocH2" name="mozTocId378082"></a>Vendor specific mode
1127pages</h2>
1128Mode page 0 is reserved for vendor specific information and it is
1129possible that some vendors use other mode pages. Some vendors call mode
1130page 0 the "unit attention" mode page. To see a list of known vendors
1131use '<span style="font-family: monospace;">sdparm -e -M xxx</span>'. To
1132see which mode pages a specific vendor documents (and <span
1133 style="font-weight: bold;">sdparm</span> has information for) use
1134something like '<span style="font-family: monospace;">sdparm -e -M sea</span>'.
1135Getting, setting and clearing of mode page fields follow the same
1136pattern as all mode pages in <span style="font-weight: bold;">sdparm.</span>
1137For example '<span style="font-family: monospace;">sdparm -M sea -p ua
1138-s PM /dev/sdc</span>'.<br>
1139<br>
1140The information for the vendor specific mode pages and their fields
1141was obtained from (disk) product manuals available on the internet.<br>
1142<h2><a class="mozTocH2" name="mozTocId67897"></a>Supported operating
1143systems</h2>
1144The <span style="font-weight: bold;">sdparm</span> utility was
1145originally written for Linux. It relies on standard Unix features and a
1146SCSI command pass through mechanism. Since it has no other special
1147dependencies, it is reasonably simple to port to other operating
1148systems.<br>
1149<h3><a class="mozTocH2" name="mozTocId600630"></a> Linux<br>
1150</h3>
1151<span style="font-weight: bold;">sdparm</span> is designed for both
1152the&nbsp; 2.6 and 2.4 Linux kernel series. There are some slight
1153differences
1154between the two environments.<br>
1155<br>
1156In the&nbsp; kernel 2.6 series <span style="font-weight: bold;">sdparm</span>
1157uses the SG_IO ioctl which is implemented for all SCSI devices and many
1158other devices that are not considered to be "SCSI" but use a SCSI
1159command
1160set. An example of the latter case is an ATAPI DVD drive which uses MMC
1161(a SCSI command set) and implements the SG_IO ioctl so <span
1162 style="font-weight: bold;">sdparm</span> will work with it (in the lk
11632.6 series). So if "<span style="font-family: monospace;">/dev/hdc</span>"
1164is a DVD drive (with or without media in
1165it) then '<span style="font-family: monospace;">sdparm /dev/hdc</span>'
1166should work.<br>
1167<br>
1168In the&nbsp; kernel 2.4 series <span style="font-weight: bold;">sdparm
1169</span>will work on all devices that use the SCSI subsystem. Internally
1170<span style="font-weight: bold;">sdparm</span> maps the given SCSI
1171device to the corresponding SCSI generic (sg) device which implements
1172the SG_IO ioctl. Hence an ATAPI DVD drive will only be accessible to
1173<span style="font-weight: bold;">sdparm</span> if the device is mapped
1174through to the SCSI subsystem with the
1175ide-scsi driver.<br>
1176<h4><a class="mozTocH2" name="mozTocId262297"></a>hdparm mapping</h4>
1177The Linux <span style="font-weight: bold;">hdparm</span> utility uses
1178command line options in many cases to
1179change or fetch a
1180specific field. These fields can be looked up in the "man page"
1181for&nbsp; hdparm. The sdparm utility uses more generic command
1182line options with acronyms for fields; these acronyms are <span
1183 style="font-style: italic;">not</span>
1184defined in <span style="font-weight: bold;">sdparm</span>'s man page
1185but can be listed (with a short
1186description)
1187with the '<span style="font-family: monospace;">--enumerate</span>'
1188option. In both cases the relevant standards
1189and/or product manuals should be consulted before some of these fields
1190are <span style="font-style: italic;">changed</span>.<br>
1191<br>
1192<span style="font-weight: bold;">hdparm</span> covers a wide sweep of
1193attributes: for the&nbsp; kernel block
1194subsystem, for the host interface (to the PATA or SATA transport), for
1195the transport specific fields of the device (at the other end of
1196the cable) and the more general attributes of the device. Even though
1197ATAPI (but not ATA) is recognised as a SCSI
1198transport, there are no standard transport specific mode pages
1199defined for <span style="font-weight: bold;">sdparm</span> to access.
1200The main area of overlap between <span style="font-weight: bold;">sdparm</span>
1201and hdparm is for general
1202device attributes. For directly attached ATAPI devices (e.g. DVD
1203drive) hdparm can be used to probe and perhaps change transport
1204characteristics while <span style="font-weight: bold;">sdparm</span>
1205can be used for more general attributes
1206(e.g. setting the TST_W (test write) field for DVD writing
1207code).<br>
1208<br>
1209<table style="width: 100%; text-align: left;" border="1" cellpadding="2"
1210 cellspacing="2">
1211  <caption><span style="font-weight: bold;">Table 2. hdparm options
1212that have sdparm equivalent</span><br>
1213  </caption> <tbody>
1214    <tr>
1215      <td style="vertical-align: top;"><span style="font-weight: bold;">hdparm
1216option</span><br>
1217      </td>
1218      <td style="vertical-align: top;"><span style="font-weight: bold;">related
1219sdparm option</span><br>
1220      </td>
1221      <td style="vertical-align: top;"><span style="font-weight: bold;">Comments</span><br>
1222      </td>
1223    </tr>
1224    <tr>
1225      <td style="vertical-align: top;">-A0<br>
1226      </td>
1227      <td style="vertical-align: top;">--set DRA=1<br>
1228      </td>
1229      <td style="vertical-align: top;">disable read look ahead. SAT
1230shows this mapping and libata may support it soon.<br>
1231      </td>
1232    </tr>
1233    <tr>
1234      <td style="vertical-align: top;">-A1<br>
1235      </td>
1236      <td style="vertical-align: top;">--set DRA=0<br>
1237      </td>
1238      <td style="vertical-align: top;">enable read look ahead (double
1239negative in sdparm). Check
1240current state with '--get DRA'.<br>
1241      </td>
1242    </tr>
1243    <tr>
1244      <td style="vertical-align: top;">-C<br>
1245      </td>
1246      <td style="vertical-align: top;">--command=ready <span
1247 style="font-style: italic;">or</span><br>
1248--command=sense<br>
1249      </td>
1250      <td style="vertical-align: top;">fetch the current device power
1251state. Use of "sense" (i.e. REQUEST SENSE SCSI command) to check the
1252power state is relatively new for SCSI devices. Not many devices will
1253support it yet.<br>
1254      </td>
1255    </tr>
1256    <tr>
1257      <td style="vertical-align: top;">-D0<br>
1258      </td>
1259      <td style="vertical-align: top;">--set AWRE=0,ARRE=0<br>
1260      </td>
1261      <td style="vertical-align: top;">disable defect management [SCSI:
1262Automatic Write/Read Reallocation Enabled fields]<br>
1263      </td>
1264    </tr>
1265    <tr>
1266      <td style="vertical-align: top;">-D1</td>
1267      <td style="vertical-align: top;">--set AWRE=1,ARRE=1</td>
1268      <td style="vertical-align: top;">enable defect management [SCSI:
1269Automatic Write/Read Reallocation Enabled fields]. This is usually
1270enabled by
1271default but is sometimes disabled on disks found in RAIDs.<br>
1272      </td>
1273    </tr>
1274    <tr>
1275      <td style="vertical-align: top;">-f<br>
1276      </td>
1277      <td style="vertical-align: top;">--command=sync<br>
1278      </td>
1279      <td style="vertical-align: top;">sdparm sends a SYNCHRONIZE CACHE
1280SCSI command; it does not touch the block layer.<br>
1281      </td>
1282    </tr>
1283    <tr>
1284      <td style="vertical-align: top;">-i<br>
1285      </td>
1286      <td style="vertical-align: top;">--inquiry<br>
1287      </td>
1288      <td style="vertical-align: top;">hdparm's '-i' is a reduced (and
1289older form) of what is available with '-I'<br>
1290      </td>
1291    </tr>
1292    <tr>
1293      <td style="vertical-align: top;">-I<br>
1294      </td>
1295      <td style="vertical-align: top;">--inquiry&nbsp;&nbsp; <span
1296 style="font-style: italic;">or<br>
1297      </span>--inquiry -ll&nbsp; <span style="font-style: italic;">or<br>
1298      </span>--inquiry --page=ai<br>
1299      </td>
1300      <td style="vertical-align: top;">The closest match here is when
1301the "ai" VPD page is available (i.e. the third related sdparm option).
1302Logically
1303much of the information from '-I' corresponds to information in a
1304standard INQUIRY response plus the "device identification" VPD page
1305(i.e. the first related sdparm option). The second related sdparm
1306option expands the
1307decoding of the standard INQUIRY response. </td>
1308    </tr>
1309    <tr>
1310      <td style="vertical-align: top;">-K1<br>
1311      </td>
1312      <td style="vertical-align: top;">--save<br>
1313      </td>
1314      <td style="vertical-align: top;">keep_features_over_reset is a
1315global flag in ATA but per field in SCSI. Hence not an exact match.<br>
1316      </td>
1317    </tr>
1318    <tr>
1319      <td style="vertical-align: top;">-L0<br>
1320      </td>
1321      <td style="vertical-align: top;">--command=unlock<br>
1322      </td>
1323      <td style="vertical-align: top;">unlock door of removable media<br>
1324      </td>
1325    </tr>
1326    <tr>
1327      <td style="vertical-align: top;">-S &lt;n&gt;<br>
1328      </td>
1329      <td style="vertical-align: top;">--set SCT=&lt;m&gt;<br>
1330      </td>
1331      <td style="vertical-align: top;">Standby condition timer,
1332&lt;n&gt; has 5 second units (roughly) while &lt;m&gt; has 100 ms units<br>
1333      </td>
1334    </tr>
1335    <tr>
1336      <td style="vertical-align: top;">-W0<br>
1337      </td>
1338      <td style="vertical-align: top;">--set WCE=0<br>
1339      </td>
1340      <td style="vertical-align: top;">disable write cache<br>
1341      </td>
1342    </tr>
1343    <tr>
1344      <td style="vertical-align: top;">-W1<br>
1345      </td>
1346      <td style="vertical-align: top;">--set WCE=1<br>
1347      </td>
1348      <td style="vertical-align: top;">enable write cache<br>
1349      </td>
1350    </tr>
1351    <tr>
1352      <td style="vertical-align: top;">-y<br>
1353      </td>
1354      <td style="vertical-align: top;">--command=stop<br>
1355      </td>
1356      <td style="vertical-align: top;">places an ATA disk, or a CD/DVD
1357drive, in standby mode<br>
1358      </td>
1359    </tr>
1360  </tbody>
1361</table>
1362<br>
1363As noted in an earlier section, even though <span
1364 style="font-weight: bold;">sdparm</span> can fetch the
1365response to an ATA IDENTIFY (PACKET) DEVICE command (with '<span
1366 style="font-family: monospace;">--page=ai</span>'
1367to get the ATA information VPD page), it dumps
1368it
1369in hex, only decoding the device identification strings. The hdparm
1370utility does decode it when its '<span style="font-family: monospace;">-I</span>'
1371option is used.
1372The hdparm utility can also accept response data from stdin as long
1373as it has a specific format (which is the format seen with '<span
1374 style="font-family: monospace;">cat
1375/proc/ide/hd&lt;x&gt;/identify</span>') when the '<span
1376 style="font-family: monospace;">--Istdin</span>' option is given.
1377See the earlier <a href="#mozTocId752074">SATA</a> section for more
1378details.<br>
1379<br>
1380Note that <span style="font-weight: bold;">hdparm</span> version 7.3
1381and later (currently at version 7.7) can detect a SATL. This yields a
1382more
1383direct way to decode the ATA IDENTIFY (PACKET) DEVICE command response
1384and
1385set features. For example '<span style="font-family: monospace;">hdparm
1386-I /dev/sda</span>' should work if <span
1387 style="font-family: monospace;">/dev/sda</span> is a SATA disk or a
1388S-ATAPI device (e.g. a CD/DVD drive).
1389<h3><a class="mozTocH2" name="mozTocId197336"></a>FreeBSD<br>
1390</h3>
1391Version 0.97 has been ported to the FreeBSD operating system. Virtually
1392all of <span style="font-weight: bold;">sdparm</span>'s features work
1393with FreeBSD. SCSI commands are routed
1394through the CAM pass-through interface. The author tested <span
1395 style="font-weight: bold;">sdparm</span> with
1396FreeBSD version 6.1 and found SCSI disks worked with the "da" device
1397(e.g. '<span style="font-family: monospace;">sdparm&nbsp; /dev/da0</span>').
1398SCSI tape drives can be accessed via
1399the "sa" device via /dev nodes starting with "esa", "nsa" and "sa". To
1400access cd/dvd drives, the kernel needs to be build with the "atapicam"
1401device after which access is via the "cd" device. Other SCSI devices
1402are "ses" (for enclosure services), "ch" (media changer (for tapes)),
1403and "pr" for processor device type (e.g. SAF-TE devices). All these
1404device may also be accessed via the "pass" device. To see the mapping
1405between the "pass" device name and the corresponding higher level
1406device node try "<span style="font-family: monospace;">camcontrol
1407devlist</span>".<br>
1408<h3><a class="mozTocH3" name="mozTocId284244"></a>Solaris</h3>
1409Version 1.02 has been ported to Solaris. The "uscsi" SCSI pass-through
1410interface is used.<br>
1411<h3><a class="mozTocH2" name="mozTocId997981"></a>Tru64<br>
1412</h3>
1413An experimental port to Tru64 (OSF) was added in version 0.97 .<br>
1414<h3><a class="mozTocH2" name="mozTocId891504"></a>Windows<br>
1415</h3>
1416This port was first added in <span style="font-weight: bold;">sdparm</span>
1417version 1.00 . Only Windows NT, 2000, 2003
1418and XP are supported (it also worked on Vista RC1). The Microsoft SCSI
1419Pass Through (SPT) interface is used
1420(i.e. the Adaptec aspi32 dll is not required). The Windows version has
1421a '<span style="font-family: monospace;">--wscan</span>'
1422option which scans for devices, attempting to list one
1423device per line. On each line are the various device names (i.e. SCSI
1424name, (first) volume name and class driver name) with the INQUIRY
1425response strings to the right. Here is an example:<br>
1426<span style="font-family: monospace;"># sdparm --wscan</span><br
1427 style="font-family: monospace;">
1428<span style="font-family: monospace;">SCSI0:0,0,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1429C:&nbsp;&nbsp;&nbsp; PD0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1430IC25N040ATCS05-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CS4O&nbsp; *</span><br
1431 style="font-family: monospace;">
1432<span style="font-family: monospace;">SCSI1:0,0,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1433D:&nbsp;&nbsp;&nbsp; CDROM0&nbsp;&nbsp; HITACHI DVD-ROM GD-S200 0034</span><br
1434 style="font-family: monospace;">
1435<span style="font-family: monospace;">SCSI2:0,0,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1436I: +&nbsp; PD5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUANTUM
1437LPS525S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3110</span><br
1438 style="font-family: monospace;">
1439<span style="font-family: monospace;">SCSI2:0,6,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1440TAPE0&nbsp;&nbsp;&nbsp; SONY&nbsp;&nbsp;&nbsp;
1441SDT-7000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0192</span><br
1442 style="font-family: monospace;">
1443<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1444E:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1445Generic USB SD Reader&nbsp;&nbsp; 1.00&nbsp; pdt=0</span><br
1446 style="font-family: monospace;">
1447<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1448PD1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Generic USB SD Reader&nbsp;&nbsp; 1.00</span><br>
1449<br>
1450The "PD&lt;n&gt;" notation is shorthand for "PhysicalDrive&lt;n&gt;"
1451which is the name passed to OS interface calls.
1452The "+" after the "I:" volume name indicates that other volumes
1453(partitions) are on that drive. In this case the device name that
1454<span style="font-weight: bold;">sdparm</span> will accept for the
1455Quantum drive are "I:", "J:",&nbsp; "PD5" or "PhysicalDrive5". Windows
1456will not allow the "SCSI2:0,0,0"
1457form to be used when a class driver name is available ("PD5" in this
1458case). The "*" at the end of the first line indicates that the INQUIRY
1459data provided by Windows was not quite correct and that usually
1460indicates
1461that the disk is an ATA device. The last two lines reflect a
1462shortcoming of
1463the current scan logic as they represent the same USB drive.<br>
1464<br>
1465The <span style="font-weight: bold;">sdparm</span> package can be
1466built in either a cygwin or MinGW
1467environment. The cygwin environment produces an executable that depends
1468on
1469cygwin1.dll which needs to be obtained separately (it is free as the <span
1470 style="font-weight: bold;">sdparm</span> package is open source). The
1471MinGW environment (and its MSYS
1472shell) produces freestanding console applications. The executables
1473produced in either environment can run in a cygwin, MSYS or "cmd" shell.<br>
1474<h2><a class="mozTocH2" name="mozTocId786906"></a>Examples</h2>
1475These examples use Linux device names. For other ports of <span
1476 style="font-weight: bold;">sdparm</span> use the appropriate device
1477names<br>
1478<br>
1479List the common (mode) parameters of a disk:<br>
1480<span style="font-family: monospace;"># sdparm /dev/sda</span><br
1481 style="font-family: monospace;">
1482<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sda:
1483SEAGATE &nbsp; ST336732LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD<br>
1484Read write error recovery mode page:<br>
1485&nbsp; AWRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1486def:&nbsp; 1, sav:&nbsp; 1]<br>
1487&nbsp; ARRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1488def:&nbsp; 1, sav:&nbsp; 1]<br>
1489&nbsp; PER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1490[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1491Caching (SBC) mode page:<br>
1492&nbsp; WCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1493[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1494&nbsp; RCD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1495[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1496Control mode page:<br>
1497&nbsp; SWP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1498[cha: n, def:&nbsp; 0, sav:&nbsp; 0]<br>
1499Informational exceptions control mode page:<br>
1500&nbsp; EWASC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1501def:&nbsp; 1, sav:&nbsp; 1]<br>
1502&nbsp; DEXCPT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y, def:&nbsp;
15030, sav:&nbsp; 0]<br>
1504&nbsp; MRIE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp; [cha: y,
1505def:&nbsp; 2, sav:&nbsp; 4]</span><span style="font-family: monospace;"><br>
1506</span><br>
1507List the descriptors within the device identification VPD page of a
1508disk. [VPD pages are fetched with the SCSI INQUIRY command.]:<br>
1509<span style="font-family: monospace;"># sdparm --inquiry /dev/sdb<br>
1510&nbsp;&nbsp;&nbsp; /dev/sdb: SEAGATE&nbsp;&nbsp;
1511ST336754SS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0003<br>
1512Device identification VPD page:<br>
1513&nbsp; Addressed logical unit:<br>
1514&nbsp;&nbsp;&nbsp; desig_type: NAA,&nbsp; code_set: Binary<br>
1515&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5000c50000520a2b<br>
1516&nbsp; Target port:<br>
1517&nbsp;&nbsp;&nbsp; desig_type: NAA,&nbsp; code_set: Binary<br>
1518&nbsp;&nbsp;&nbsp;&nbsp; transport: Serial Attached SCSI (SAS)<br>
1519&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5000c50000520a2a<br>
1520&nbsp;&nbsp;&nbsp; desig_type: Relative target port,&nbsp; code_set:
1521Binary<br>
1522&nbsp;&nbsp;&nbsp;&nbsp; transport: Serial Attached SCSI (SAS)<br>
1523&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Relative target port: 0x2<br>
1524&nbsp; Target device that contains addressed lu:<br>
1525&nbsp;&nbsp;&nbsp; desig_type: NAA,&nbsp; code_set: Binary<br>
1526&nbsp;&nbsp;&nbsp;&nbsp; transport: Serial Attached SCSI (SAS)<br>
1527&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5000c50000520a28<br>
1528&nbsp;&nbsp;&nbsp; desig_type: SCSI name string,&nbsp; code_set: UTF-8<br>
1529&nbsp;&nbsp;&nbsp;&nbsp; transport: Serial Attached SCSI (SAS)<br>
1530&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCSI name string:<br>
1531&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; naa.5000C50000520A28<br>
1532<br>
1533</span>To trim down that output, add the '<span
1534 style="font-family: monospace;">--quiet</span>' option:<span
1535 style="font-family: monospace;"><br>
1536# sdparm --inquiry --quiet /dev/sdb<br>
15370x5000c50000520a2b<br>
15380x5000c50000520a2a<br>
15390x5000c50000520a28<br>
1540naa.5000C50000520A28<br>
1541</span><span style="font-family: monospace;"></span><br>
1542See all parameters for the read write error recovery mode page:<br>
1543<span style="font-family: monospace;"># sdparm --page=rw /dev/sda</span><br
1544 style="font-family: monospace;">
1545<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sda:
1546SEAGATE&nbsp;&nbsp;
1547ST336732LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><span
1548 style="font-family: monospace;"><br>
1549Read write error recovery mode page:<br>
1550&nbsp; AWRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1551def:&nbsp; 1, sav:&nbsp; 1]<br>
1552&nbsp; ARRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1553def:&nbsp; 1, sav:&nbsp; 1]<br>
1554&nbsp; TB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1555[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1556&nbsp; RC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1557[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1558&nbsp; EER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1559[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1560&nbsp; PER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1561[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1562&nbsp; DTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1563[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1564&nbsp; DCR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1565[cha: y, def:&nbsp; 0, sav:&nbsp; 0]<br>
1566&nbsp; RRC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp; [cha: y,
1567def: 11, sav: 11]<br>
1568&nbsp; COR_S&nbsp;&nbsp;&nbsp;&nbsp; 240&nbsp; [cha: n, def:240,
1569sav:240]<br>
1570&nbsp; HOC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1571[cha: n, def:&nbsp; 0, sav:&nbsp; 0]<br>
1572&nbsp; DSOC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1573def:&nbsp; 0, sav:&nbsp; 0]<br>
1574&nbsp; WRC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;
1575[cha: y, def:&nbsp; 5, sav:&nbsp; 5]<br>
1576&nbsp; RTL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1&nbsp; [cha: y,
1577def: -1, sav: -1]<br>
1578</span><br>
1579See all parameters for the read write error recovery mode page with
1580acronym descriptions:<br>
1581<span style="font-family: monospace;"># sdparm --page=rw --long /dev/sda</span><br
1582 style="font-family: monospace;">
1583<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sda:
1584SEAGATE &nbsp; ST336732LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD<br>
1585&nbsp;&nbsp;&nbsp; Direct access device specific parameters: WP=0&nbsp;
1586DPOFUA=1</span><br style="font-family: monospace;">
1587<span style="font-family: monospace;">Read write error recovery mode
1588page:</span><br style="font-family: monospace;">
1589<span style="font-family: monospace;">&nbsp;
1590AWRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1591def:&nbsp; 1, sav:&nbsp; 1]&nbsp; Automatic write reallocation enabled</span><br
1592 style="font-family: monospace;">
1593<span style="font-family: monospace;">&nbsp;
1594ARRE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: y,
1595def:&nbsp; 1, sav:&nbsp; 1]&nbsp; Automatic read reallocation enabled</span><br
1596 style="font-family: monospace;">
1597<span style="font-family: monospace;">&nbsp;
1598TB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha:
1599y, def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Transfer block</span><br
1600 style="font-family: monospace;">
1601<span style="font-family: monospace;">&nbsp;
1602RC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha:
1603y, def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Read continuous</span><br
1604 style="font-family: monospace;">
1605<span style="font-family: monospace;">&nbsp;
1606EER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y,
1607def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Enable early recovery</span><br
1608 style="font-family: monospace;">
1609<span style="font-family: monospace;">&nbsp;
1610PER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y,
1611def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Post error</span><br
1612 style="font-family: monospace;">
1613<span style="font-family: monospace;">&nbsp;
1614DTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y,
1615def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Data terminate on error</span><br
1616 style="font-family: monospace;">
1617<span style="font-family: monospace;">&nbsp;
1618DCR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y,
1619def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Disable correction</span><br
1620 style="font-family: monospace;">
1621<span style="font-family: monospace;">&nbsp;
1622RRC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11&nbsp; [cha: y, def:
162311, sav: 11]&nbsp; Read retry count</span><br
1624 style="font-family: monospace;">
1625<span style="font-family: monospace;">&nbsp;
1626COR_S&nbsp;&nbsp;&nbsp;&nbsp; 240&nbsp; [cha: n, def:240,
1627sav:240]&nbsp; Correction span (obsolete)</span><br
1628 style="font-family: monospace;">
1629<span style="font-family: monospace;">&nbsp;
1630HOC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1631def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Head offset count (obsolete)</span><br
1632 style="font-family: monospace;">
1633<span style="font-family: monospace;">&nbsp;
1634DSOC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1635def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Data strobe offset count (obsolete)</span><br
1636 style="font-family: monospace;">
1637<span style="font-family: monospace;">&nbsp;
1638WRC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp; [cha: y,
1639def:&nbsp; 5, sav:&nbsp; 5]&nbsp; Write retry count</span><br
1640 style="font-family: monospace;">
1641<span style="font-family: monospace;">&nbsp;
1642RTL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1&nbsp; [cha: y, def:
1643-1, sav: -1]&nbsp; Recovery time limit (ms)</span><br>
1644<span style="font-family: monospace;"></span><span
1645 style="font-family: monospace;"><br>
1646</span>The '<span style="font-family: monospace;">--long</span>' option
1647can be used twice to get more information on
1648selected mode page field values. The next example uses the
1649'<span style="font-family: monospace;">--enumerate</span>' option so
1650that tables within <span style="font-weight: bold;">sdparm</span> are
1651being probed
1652(rather than a specific <span style="font-style: italic;">DEVICE</span>):<br>
1653<span style="font-family: monospace;"># sdparm --enumerate --page=ie
1654--long --long</span><br style="font-family: monospace;">
1655<span style="font-family: monospace;">Informational exceptions control
1656[0x1c] mode page:</span><br style="font-family: monospace;">
1657<span style="font-family: monospace;">&nbsp;
1658PERF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x02:7:1 ]&nbsp; Performance</span><br
1659 style="font-family: monospace;">
1660<span style="font-family: monospace;">&nbsp;
1661EBF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x02:5:1 ]&nbsp; Enable
1662background function</span><br style="font-family: monospace;">
1663<span style="font-family: monospace;">&nbsp;
1664EWASC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x02:4:1 ]&nbsp; Enable warning</span><br
1665 style="font-family: monospace;">
1666<span style="font-family: monospace;">&nbsp;
1667DEXCPT&nbsp;&nbsp;&nbsp;&nbsp; [0x02:3:1 ]&nbsp; Disable exceptions</span><br
1668 style="font-family: monospace;">
1669<span style="font-family: monospace;">&nbsp;
1670TEST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x02:2:1 ]&nbsp; Test
1671(simulate device failure)</span><br style="font-family: monospace;">
1672<span style="font-family: monospace;">&nbsp; EBACKERR&nbsp;&nbsp;
1673[0x02:1:1 ]&nbsp; Enable background error reporting</span><br
1674 style="font-family: monospace;">
1675<span style="font-family: monospace;">&nbsp;
1676LOGERR&nbsp;&nbsp;&nbsp;&nbsp; [0x02:0:1 ]&nbsp; Log informational
1677exception errors</span><br style="font-family: monospace;">
1678<span style="font-family: monospace;">&nbsp;
1679MRIE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x03:3:4 ]&nbsp; Method of
1680reporting informational exceptions</span><br
1681 style="font-family: monospace;">
1682<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
16830: no reporting; 1: async reporting; 2: unit attention</span><br
1684 style="font-family: monospace;">
1685<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
16863: conditional recovered error; 4: recovered error</span><br
1687 style="font-family: monospace;">
1688<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
16895: check condition with no sense; 6: request sense only</span><br
1690 style="font-family: monospace;">
1691<span style="font-family: monospace;">&nbsp;
1692INTT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x04:7:32]&nbsp; Interval
1693timer (100 ms)</span><br style="font-family: monospace;">
1694<span style="font-family: monospace;">&nbsp;
1695REPC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x08:7:32]&nbsp; Report count</span><br>
1696<br>
1697The short option form of the above invocation would be '<span
1698 style="font-family: monospace;">sdparm -ell -p
1699ie</span>'. Notice that the MRIE field has its possible values listed
1700on
1701the next, tab indented, lines. Only fields with non-obvious values
1702supply this extra information.<br>
1703<span style="font-family: monospace;"></span><br>
1704To get the
1705Writeback Cache Enable (WCE) values from the caching control mode
1706page:<br>
1707<span style="font-family: monospace;"># sdparm --get=WCE /dev/sdd</span><br
1708 style="font-family: monospace;">
1709<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1710SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD<br>
1711WCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: y,
1712def:&nbsp; 1, sav:&nbsp; 0]</span><br>
1713<span style="font-family: monospace;"></span><br>
1714Get the Write Cache Enable (WCE) values from the caching control mode
1715page in hex (using short option form). The four values are the current
1716value, the changeable mask, the default value and the saved value
1717respectively:<br>
1718<span style="font-family: monospace;"># sdparm -g WCE -H /dev/sdd</span><br
1719 style="font-family: monospace;">
1720<span style="font-family: monospace;">0x00 0x01 0x01 0x00</span><br>
1721<br>
1722Get the Write Cache Enable (WCE) current value from the caching control
1723mode page in hex:<br>
1724<span style="font-family: monospace;"># sdparm -g WCE=1 -H /dev/sdd</span><br
1725 style="font-family: monospace;">
1726<span style="font-family: monospace;">0x00</span><br>
1727<br>
1728Set the "write cache enable" current value in the caching control mode
1729page. Note that only INQUIRY identification information is output; if
1730an error occurs then more information is output (and the sdparm process
1731completes with a non-zero exit status):<br>
1732<span style="font-family: monospace;"># sdparm --set=WCE /dev/sdd</span><br
1733 style="font-family: monospace;">
1734<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1735SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><br>
1736<br>
1737Check that change occurred (and suppress the disk identification line
1738with '<span style="font-family: monospace;">--quiet</span>'):<br>
1739<span style="font-family: monospace;"># sdparm --get=WCE --quiet
1740/dev/sdd</span><span style="font-family: monospace;"></span><span
1741 style="font-family: monospace;"><br>
1742</span><span style="font-family: monospace;">WCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
17431&nbsp; [cha: y, def:&nbsp; 1, sav:&nbsp; 0]</span><br>
1744<br>
1745Change both the current and saved values of the WCE field:<br>
1746<span style="font-family: monospace;"># sdparm --set=WCE --save /dev/sdd</span><br
1747 style="font-family: monospace;">
1748<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1749SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><br>
1750<br>
1751Check that saved value has also changed:<br>
1752<span style="font-family: monospace;"># sdparm --get=WCE /dev/sdd</span><br
1753 style="font-family: monospace;">
1754<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1755SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><span
1756 style="font-family: monospace;"><br>
1757</span><span style="font-family: monospace;">WCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
17581&nbsp; [cha: y, def:&nbsp; 1, sav:&nbsp; 1]</span><br>
1759<br>
1760Multiple fields in the same mode page can be changed (set WCE and clear
1761RCD):<br>
1762<span style="font-family: monospace;"># sdparm --set=WCE --clear=RCD
1763--save /dev/sdd</span><br style="font-family: monospace;">
1764<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1765SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><br>
1766<br>
1767The previous example can also be written as:<br>
1768<span style="font-family: monospace;"># sdparm -s WCE=1,RCD=0 -S
1769/dev/sdd</span><br style="font-family: monospace;">
1770<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1771SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><br>
1772<br>
1773Set the caching mode page to its default values (copy defaults into
1774current and saved values):<br>
1775<span style="font-family: monospace;"># sdparm --page=ca --defaults
1776--save /dev/sdd</span><br style="font-family: monospace;">
1777<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sdd:
1778SEAGATE &nbsp; ST373453LC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD</span><br>
1779<br>
1780One disk vendor has a "performance mode" bit (PM) in the vendor
1781specific unit attention mode page [0x0,0x0]. PM=0 is server mode (the
1782default) while PM=1 is desktop mode. Desktop mode can be set (both
1783current and saved values) with:<br>
1784<span style="font-family: monospace;"># sdparm --page=0 --set=2:7:1=1
1785--save --quiet /dev/sdd</span><span style="font-family: monospace;"></span><br>
1786<br>
1787Since there are no acronyms defined for the unit attention mode page,
1788its fields can be viewed in hex. The above command causes the top bit
1789in byte 2 of the current and saved values to be set:<br>
1790<span style="font-family: monospace;"># sdparm --page=0 --hex /dev/sdd</span><br
1791 style="font-family: monospace;">
1792<span style="font-family: monospace;">mode page 0x0:</span><br
1793 style="font-family: monospace;">
1794<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; Current:</span><br
1795 style="font-family: monospace;">
1796<span style="font-family: monospace;">&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;
179780 06 80 00 0f 00 00 00</span><br style="font-family: monospace;">
1798<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; Changeable:</span><br
1799 style="font-family: monospace;">
1800<span style="font-family: monospace;">&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;
180180 06 f7 40 0f 00 00 00</span><br style="font-family: monospace;">
1802<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; Default:</span><br
1803 style="font-family: monospace;">
1804<span style="font-family: monospace;">&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;
180580 06 00 00 0f 00 00 00</span><br style="font-family: monospace;">
1806<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; Saved:</span><br
1807 style="font-family: monospace;">
1808<span style="font-family: monospace;">&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;
180980 06 80 00 0f 00 00 00</span><br>
1810<br>
1811So where acronyms are available, values can be fetched and set in a
1812relatively straight forward manner. In the absence of acronyms, the
1813lower level numeric descriptors can be used. Here is an example of
1814using a numeric descriptor to set the single bit at bit postion 7 in
1815byte 2 in mode page 0 to the value 1. The corresponding saved value is
1816also set:<br>
1817<br>
1818<span style="font-family: monospace;">sdparm --page=0 --set=2:7:1=1
1819--save /dev/sda</span><br>
1820<br>
1821Here is an example of common transport parameters fetched from a SAS
1822disk. The '<span style="font-family: monospace;">--long</span>' option
1823adds a description of each field to the right:<span
1824 style="font-family: monospace;"><br>
1825<br>
1826# sdparm --transport=sas --long /dev/sdc<br>
1827&nbsp;&nbsp;&nbsp; /dev/sdc: TESTING &nbsp;
1828XY777701SS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ABCD<br>
1829&nbsp;&nbsp;&nbsp; Direct access device specific parameters: WP=0&nbsp;
1830DPOFUA=1<br>
1831Disconnect-reconnect (SAS) [dr] mode page:<br>
1832&nbsp; BITL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1833def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Bus inactivity time limit (100us)<br>
1834&nbsp; MCTL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1835def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Maximum connect time limit (100us)<br>
1836&nbsp; MBS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 314&nbsp; [cha: y,
1837def:314, sav:314]&nbsp; Maximum burst size (512 bytes)<br>
1838Protocol specific logical unit (SAS) [p1] mode page:<br>
1839&nbsp; LUPID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp; [cha: n,
1840def:&nbsp; 6, sav:&nbsp; 6]&nbsp; Logical unit's (transport) protocol
1841identifier<br>
1842Protocol specific port (SAS) [pp] mode page:<br>
1843&nbsp; PPID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp; [cha: n,
1844def:&nbsp; 6, sav:&nbsp; 6]&nbsp; Port's (transport) protocol identifier<br>
1845&nbsp; BAE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1846[cha: n, def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Broadcast asynchronous event<br>
1847&nbsp; RLM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;
1848[cha: y, def:&nbsp; 0, sav:&nbsp; 0]&nbsp; Ready LED meaning<br>
1849&nbsp; ITNLT&nbsp;&nbsp;&nbsp;&nbsp; 2000&nbsp; [cha: y, def:2000,
1850sav:2000]&nbsp; I_T nexus loss time (ms)<br>
1851&nbsp; IRT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10000&nbsp; [cha: y,
1852def:&nbsp; 0, sav:10000]&nbsp; Initiator response timeout (ms)<br>
1853Phy control and discover (SAS) [pcd] mode page:<br>
1854&nbsp; NOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;
1855[cha: n, def:&nbsp; 2, sav:&nbsp; 2]&nbsp; Number of phys<br>
1856<br>
1857</span>Say we want to look closer at the SAS "phy control and discover"
1858mode page. It
1859has variable length with a header portion (containing PPID_1, GENC, and
1860NOP) followed by two
1861descriptors (as indicated by the current value of NOP). The first
1862descriptor (which could have the ".0" extension but it is not displayed
1863on output) ranges from PHID to HMALR inclusive. The second descriptor
1864has the ".1" suffix:<br>
1865<br>
1866<span style="font-family: monospace;">$ sdparm -t sas -p pcd -l /dev/sdc</span><br
1867 style="font-family: monospace;">
1868<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; /dev/sg0:
1869Linux&nbsp;&nbsp;&nbsp;&nbsp;
1870scsi_debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.82</span><br
1871 style="font-family: monospace;">
1872<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; Direct access
1873device specific parameters: WP=0&nbsp; DPOFUA=1</span><br
1874 style="font-family: monospace;">
1875<span style="font-family: monospace;">Phy control and discover (SAS)
1876[pcd] mode page:</span><br style="font-family: monospace;">
1877<span style="font-family: monospace;">&nbsp;
1878PPID_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6&nbsp; [cha: n, def:&nbsp;
18796]&nbsp; Port's (transport) protocol identifier</span><br
1880 style="font-family: monospace;">
1881<span style="font-family: monospace;">&nbsp;
1882GENC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7&nbsp; [cha: n,
1883def:&nbsp; 7]&nbsp; Generation code</span><br
1884 style="font-family: monospace;">
1885<span style="font-family: monospace;">&nbsp;
1886NOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; [cha: n,
1887def:&nbsp; 2]&nbsp; Number of phys</span><br
1888 style="font-family: monospace;">
1889<span style="font-family: monospace;">&nbsp;
1890PHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1891def:&nbsp; 0]&nbsp; Phy identifier</span><br
1892 style="font-family: monospace;">
1893<span style="font-family: monospace;">&nbsp;
1894ADT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: n,
1895def:&nbsp; 1]&nbsp; Attached device type</span><br
1896 style="font-family: monospace;">
1897<span style="font-family: monospace;">&nbsp;
1898AREAS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
18990]&nbsp; Attached reason (other end did link reset)</span><br
1900 style="font-family: monospace;">
1901<span style="font-family: monospace;">&nbsp;
1902REAS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1903def:&nbsp; 0]&nbsp; Reason (for starting link reset)</span><br
1904 style="font-family: monospace;">
1905<span style="font-family: monospace;">&nbsp;
1906NPLR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n,
1907def:&nbsp; 9]&nbsp; Negotiated logical link rate</span><br
1908 style="font-family: monospace;">
1909<span style="font-family: monospace;">&nbsp;
1910ASIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: n,
1911def:&nbsp; 1]&nbsp; Attached SSP initiator port</span><br
1912 style="font-family: monospace;">
1913<span style="font-family: monospace;">&nbsp;
1914ATIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1915def:&nbsp; 0]&nbsp; Attached STP initiator port</span><br
1916 style="font-family: monospace;">
1917<span style="font-family: monospace;">&nbsp;
1918AMIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1919def:&nbsp; 0]&nbsp; Attached SMP initiator port</span><br
1920 style="font-family: monospace;">
1921<span style="font-family: monospace;">&nbsp;
1922ASTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1923def:&nbsp; 0]&nbsp; Attached SSP target port</span><br
1924 style="font-family: monospace;">
1925<span style="font-family: monospace;">&nbsp;
1926ATTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1927def:&nbsp; 0]&nbsp; Attached STP target port</span><br
1928 style="font-family: monospace;">
1929<span style="font-family: monospace;">&nbsp;
1930AMTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n,
1931def:&nbsp; 0]&nbsp; Attached SMP target port</span><br
1932 style="font-family: monospace;">
1933<span style="font-family: monospace;">&nbsp;
1934SASA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x52222220000007ce&nbsp; [cha: n,
1935def:0x52222220000007ce]&nbsp; SAS address</span><br
1936 style="font-family: monospace;">
1937<span style="font-family: monospace;">&nbsp;
1938ASASA&nbsp;&nbsp;&nbsp;&nbsp; 0x5111111000000001&nbsp; [cha: n,
1939def:0x5111111000000001]&nbsp; Attached SAS address</span><br
1940 style="font-family: monospace;">
1941<span style="font-family: monospace;">&nbsp;
1942APHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; [cha: n, def:&nbsp;
19432]&nbsp; Attached phy identifier</span><br
1944 style="font-family: monospace;">
1945<span style="font-family: monospace;">&nbsp;
1946PMILR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp; [cha: n, def:&nbsp;
19478]&nbsp; Programmed minimum link rate</span><br
1948 style="font-family: monospace;">
1949<span style="font-family: monospace;">&nbsp;
1950HMILR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp; [cha: n, def:&nbsp;
19518]&nbsp; Hardware minimum link rate</span><br
1952 style="font-family: monospace;">
1953<span style="font-family: monospace;">&nbsp;
1954PMALR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n, def:&nbsp;
19559]&nbsp; Programmed maximum link rate</span><br
1956 style="font-family: monospace;">
1957<span style="font-family: monospace;">&nbsp;
1958HMALR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n, def:&nbsp;
19599]&nbsp; Hardware maximum link rate</span><br
1960 style="font-family: monospace;">
1961<span style="font-family: monospace;">&nbsp;
1962PHID.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: n, def:&nbsp;
19631]&nbsp; Phy identifier</span><br style="font-family: monospace;">
1964<span style="font-family: monospace;">&nbsp;
1965ADT.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: n, def:&nbsp;
19661]&nbsp; Attached device type</span><br style="font-family: monospace;">
1967<span style="font-family: monospace;">&nbsp;
1968AREAS.1&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp; 0]&nbsp;
1969Attached reason (other end did link reset)</span><br
1970 style="font-family: monospace;">
1971<span style="font-family: monospace;">&nbsp;
1972REAS.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
19730]&nbsp; Reason (for starting link reset)</span><br
1974 style="font-family: monospace;">
1975<span style="font-family: monospace;">&nbsp;
1976NPLR.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n, def:&nbsp;
19779]&nbsp; Negotiated logical link rate</span><br
1978 style="font-family: monospace;">
1979<span style="font-family: monospace;">&nbsp;
1980ASIP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; [cha: n, def:&nbsp;
19811]&nbsp; Attached SSP initiator port</span><br
1982 style="font-family: monospace;">
1983<span style="font-family: monospace;">&nbsp;
1984ATIP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
19850]&nbsp; Attached STP initiator port</span><br
1986 style="font-family: monospace;">
1987<span style="font-family: monospace;">&nbsp;
1988AMIP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
19890]&nbsp; Attached SMP initiator port</span><br
1990 style="font-family: monospace;">
1991<span style="font-family: monospace;">&nbsp;
1992ASTP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
19930]&nbsp; Attached SSP target port</span><br
1994 style="font-family: monospace;">
1995<span style="font-family: monospace;">&nbsp;
1996ATTP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
19970]&nbsp; Attached STP target port</span><br
1998 style="font-family: monospace;">
1999<span style="font-family: monospace;">&nbsp;
2000AMTP.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; [cha: n, def:&nbsp;
20010]&nbsp; Attached SMP target port</span><br
2002 style="font-family: monospace;">
2003<span style="font-family: monospace;">&nbsp; SASA.1&nbsp;&nbsp;&nbsp;
20040x52222220000007cf&nbsp; [cha: n, def:0x52222220000007cf]&nbsp; SAS
2005address</span><br style="font-family: monospace;">
2006<span style="font-family: monospace;">&nbsp; ASASA.1&nbsp;&nbsp;
20070x5111111000000001&nbsp; [cha: n, def:0x5111111000000001]&nbsp;
2008Attached SAS address</span><br style="font-family: monospace;">
2009<span style="font-family: monospace;">&nbsp;
2010APHID.1&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp; [cha: n, def:&nbsp; 3]&nbsp;
2011Attached phy identifier</span><br style="font-family: monospace;">
2012<span style="font-family: monospace;">&nbsp;
2013PMILR.1&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp; [cha: n, def:&nbsp; 8]&nbsp;
2014Programmed minimum link rate</span><br style="font-family: monospace;">
2015<span style="font-family: monospace;">&nbsp;
2016HMILR.1&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp; [cha: n, def:&nbsp; 8]&nbsp;
2017Hardware minimum link rate</span><br style="font-family: monospace;">
2018<span style="font-family: monospace;">&nbsp;
2019PMALR.1&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n, def:&nbsp; 9]&nbsp;
2020Programmed maximum link rate</span><br style="font-family: monospace;">
2021<span style="font-family: monospace;">&nbsp;
2022HMALR.1&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp; [cha: n, def:&nbsp; 9]&nbsp;
2023Hardware maximum link rate</span><br>
2024<br>
2025The '<span style="font-family: monospace;">--long</span>' with '<span
2026 style="font-family: monospace;">--enumerate</span>'
2027options on a mode page that can have descriptors appends descriptor
2028format information after the fields. The SAS phy control and discovery
2029mode page can have descriptors (one for each phy). A '<span
2030 style="font-family: monospace;">--transport=sas</span>'
2031option is not required (from version 1.02 onwards) because "pcd"
2032doesn't match any generic mode page (or VPD page) abbreviation, so SAS
2033mode page abbreviations are checked and a match is found.<br>
2034<span style="font-family: monospace;"># sdparm --enumerate --page=pcd
2035--long</span><br style="font-family: monospace;">
2036<span style="font-family: monospace;">Phy control and discover (SAS)
2037[pcd: 0x19,0x1] mode page:</span><br style="font-family: monospace;">
2038<span style="font-family: monospace;">&nbsp;
2039PPID_1&nbsp;&nbsp;&nbsp;&nbsp; [0x05:3:4 ]&nbsp; Port's (transport)
2040protocol identifier</span><br style="font-family: monospace;">
2041<span style="font-family: monospace;">&nbsp;
2042GENC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x06:7:8 ]&nbsp; Generation
2043code</span><br style="font-family: monospace;">
2044<span style="font-family: monospace;">&nbsp;
2045NOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x07:7:8 ]&nbsp; Number
2046of phys</span><br style="font-family: monospace;">
2047<span style="font-family: monospace;">&nbsp;
2048PHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x09:7:8 ]&nbsp; Phy
2049identifier</span><br style="font-family: monospace;">
2050<span style="font-family: monospace;">&nbsp;
2051ADT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0c:6:3 ]&nbsp;
2052Attached device type</span><br style="font-family: monospace;">
2053<span style="font-family: monospace;">&nbsp;
2054AREAS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0c:3:4 ]&nbsp; Attached reason
2055(other end did link reset)</span><br style="font-family: monospace;">
2056<span style="font-family: monospace;">&nbsp;
2057REAS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0d:7:4 ]&nbsp; Reason (for
2058starting link reset)</span><br style="font-family: monospace;">
2059<span style="font-family: monospace;">&nbsp;
2060NPLR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0d:3:4 ]&nbsp; Negotiated
2061logical link rate</span><br style="font-family: monospace;">
2062<span style="font-family: monospace;">&nbsp;
2063ASIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0e:3:1 ]&nbsp; Attached SSP
2064initiator port</span><br style="font-family: monospace;">
2065<span style="font-family: monospace;">&nbsp;
2066ATIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0e:2:1 ]&nbsp; Attached STP
2067initiator port</span><br style="font-family: monospace;">
2068<span style="font-family: monospace;">&nbsp;
2069AMIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0e:1:1 ]&nbsp; Attached SMP
2070initiator port</span><br style="font-family: monospace;">
2071<span style="font-family: monospace;">&nbsp;
2072ASTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0f:3:1 ]&nbsp; Attached SSP
2073target port</span><br style="font-family: monospace;">
2074<span style="font-family: monospace;">&nbsp;
2075ATTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0f:2:1 ]&nbsp; Attached STP
2076target port</span><br style="font-family: monospace;">
2077<span style="font-family: monospace;">&nbsp;
2078AMTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x0f:1:1 ]&nbsp; Attached SMP
2079target port</span><br style="font-family: monospace;">
2080<span style="font-family: monospace;">&nbsp;
2081SASA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x10:7:64]&nbsp; SAS address</span><br
2082 style="font-family: monospace;">
2083<span style="font-family: monospace;">&nbsp;
2084ASASA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x18:7:64]&nbsp; Attached SAS
2085address</span><br style="font-family: monospace;">
2086<span style="font-family: monospace;">&nbsp;
2087APHID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x20:7:8 ]&nbsp; Attached phy
2088identifier</span><br style="font-family: monospace;">
2089<span style="font-family: monospace;">&nbsp;
2090PMILR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x28:7:4 ]&nbsp; Programmed
2091minimum link rate</span><br style="font-family: monospace;">
2092<span style="font-family: monospace;">&nbsp;
2093HMILR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x28:3:4 ]&nbsp; Hardware minimum
2094link rate</span><br style="font-family: monospace;">
2095<span style="font-family: monospace;">&nbsp;
2096PMALR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x29:7:4 ]&nbsp; Programmed
2097maximum link rate</span><br style="font-family: monospace;">
2098<span style="font-family: monospace;">&nbsp;
2099HMALR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [0x29:3:4 ]&nbsp; Hardware maximum
2100link rate</span><br style="font-family: monospace;">
2101<span style="font-family: monospace;">&nbsp; &lt;&lt;SAS phy mode
2102descriptor&gt;&gt;</span><br style="font-family: monospace;">
2103<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
2104num_descs_off=7, num_descs_bytes=1, num_descs_inc=0, first_desc_off=8</span><br
2105 style="font-family: monospace;">
2106<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
2107descriptor_len=48<br>
2108<br>
2109</span>Here is a command example; for ejecting a DVD from a drive:<br>
2110<br>
2111<span style="font-family: monospace;"># sdparm --command=eject /dev/hdc<br>
2112&nbsp;&nbsp;&nbsp; /dev/hdc: HITACHI&nbsp;&nbsp; DVD-ROM
2113GD-S200&nbsp;&nbsp; 0034&nbsp; [pdt=0x5]<br>
2114# echo $?<br>
21150<br>
2116<br>
2117</span>The process status of 0 indicates that the eject command
2118succeeded.<span style="font-family: monospace;"><br>
2119</span>
2120<h2><a class="mozTocH2" name="mozTocId166213"></a>Downloads</h2>
2121The initial version of <span style="font-weight: bold;">sdparm</span>
2122was 0.90 .<br>
2123<table border="1" width="100%">
2124  <caption><b>Table 2. sdparm tarballs, rpm + deb packages</b></caption>
2125  <tbody>
2126    <tr>
2127      <td><span style="font-weight: bold;">version</span><br>
2128      </td>
2129      <td valign="top">&nbsp; <b>tarball</b> <br>
2130      </td>
2131      <td><b>i386 rpm binary **<br>
2132      </b></td>
2133      <td valign="top">&nbsp;&nbsp; <span style="font-weight: bold;">debian
2134package</span><br>
2135      </td>
2136      <td style="vertical-align: top;"><span style="font-weight: bold;">Windows
2137exe</span><br>
2138      </td>
2139    </tr>
2140    <tr>
2141      <td style="vertical-align: top;"><span style="font-weight: bold;">0.90</span><br>
2142      </td>
2143      <td style="vertical-align: top;"><a href="p/sdparm-0.90.tgz">sdparm-0.90.tgz</a><br>
2144      </td>
2145      <td style="vertical-align: top;"><a
2146 href="p/sdparm-0.90-1.i386.rpm">sdparm-0.90-1.i386.rpm</a></td>
2147      <td style="vertical-align: top;"><a
2148 href="p/sdparm_0.90-2_i386.deb">sdparm_0.90-2_i386.deb</a></td>
2149      <td style="vertical-align: top;"><br>
2150      </td>
2151    </tr>
2152    <tr>
2153      <td style="vertical-align: top;"><span style="font-weight: bold;">0.91</span><br>
2154      </td>
2155      <td style="vertical-align: top;"><a href="p/sdparm-0.91.tgz">sdparm-0.91.tgz</a></td>
2156      <td style="vertical-align: top;"><a
2157 href="p/sdparm-0.91-1.i386.rpm">sdparm-0.91-1.i386.rpm</a> </td>
2158      <td style="vertical-align: top;"><a
2159 href="p/sdparm_0.91-2_i386.deb">sdparm_0.91-2_i386.deb</a> </td>
2160      <td style="vertical-align: top;"><br>
2161      </td>
2162    </tr>
2163    <tr>
2164      <td style="vertical-align: top;"><span style="font-weight: bold;">0.92</span><br>
2165      </td>
2166      <td style="vertical-align: top;"><a href="p/sdparm-0.92.tgz">sdparm-0.92.tgz</a></td>
2167      <td style="vertical-align: top;"><a
2168 href="p/sdparm-0.92-1.i386.rpm">sdparm-0.92-1.i386.rpm</a></td>
2169      <td style="vertical-align: top;"><a
2170 href="p/sdparm_0.92-2_i386.deb">sdparm_0.92-2_i386.deb</a></td>
2171      <td style="vertical-align: top;"><br>
2172      </td>
2173    </tr>
2174    <tr>
2175      <td style="vertical-align: top;"><span style="font-weight: bold;">0.93</span><br>
2176      </td>
2177      <td style="vertical-align: top;"><a href="p/sdparm-0.93.tgz">sdparm-0.93.tgz</a></td>
2178      <td style="vertical-align: top;"><a
2179 href="p/sdparm-0.93-1.i386.rpm">sdparm-0.93-1.i386.rpm</a> </td>
2180      <td style="vertical-align: top;"><a
2181 href="p/sdparm_0.93-2_i386.deb">sdparm_0.93-2_i386.deb</a> </td>
2182      <td style="vertical-align: top;"><br>
2183      </td>
2184    </tr>
2185    <tr>
2186      <td style="vertical-align: top;"><span style="font-weight: bold;">0.94</span></td>
2187      <td style="vertical-align: top;"><a href="p/sdparm-0.94.tgz">sdparm-0.94.tgz</a></td>
2188      <td style="vertical-align: top;"><a
2189 href="p/sdparm-0.94-1.i386.rpm">sdparm-0.94-1.i386.rpm</a></td>
2190      <td style="vertical-align: top;"><a
2191 href="p/sdparm_0.94-2_i386.deb">sdparm_0.94-2_i386.deb</a></td>
2192      <td style="vertical-align: top;"><br>
2193      </td>
2194    </tr>
2195    <tr>
2196      <td style="vertical-align: top;"><span style="font-weight: bold;">0.95</span><br>
2197      </td>
2198      <td style="vertical-align: top;"><a href="p/sdparm-0.95.tgz">sdparm-0.95.tgz</a></td>
2199      <td style="vertical-align: top;"><a
2200 href="p/sdparm-0.95-1.i386.rpm">sdparm-0.95-1.i386.rpm</a> </td>
2201      <td style="vertical-align: top;"><a
2202 href="p/sdparm_0.95-0.1_i386.deb">sdparm_0.95-0.1_i386.deb</a> </td>
2203      <td style="vertical-align: top;"><br>
2204      </td>
2205    </tr>
2206    <tr>
2207      <td style="vertical-align: top;"><span style="font-weight: bold;">0.96</span><br>
2208      </td>
2209      <td style="vertical-align: top;"><a href="p/sdparm-0.96.tgz">sdparm-0.96.tgz</a>
2210      </td>
2211      <td style="vertical-align: top;"><a
2212 href="p/sdparm-0.96-1.i386.rpm">sdparm-0.96-1.i386.rpm</a> </td>
2213      <td style="vertical-align: top;"><a
2214 href="p/sdparm_0.96-0.1_i386.deb">sdparm_0.96-0.1_i386.deb</a> </td>
2215      <td style="vertical-align: top;"><br>
2216      </td>
2217    </tr>
2218    <tr>
2219      <td style="vertical-align: top;"><span style="font-weight: bold;">0.97</span><br>
2220      </td>
2221      <td style="vertical-align: top;"><a href="p/sdparm-0.97.tgz">sdparm-0.97.tgz</a></td>
2222      <td style="vertical-align: top;"><a
2223 href="p/sdparm-0.97-1.i386.rpm">sdparm-0.97-1.i386.rpm</a> </td>
2224      <td style="vertical-align: top;"><a
2225 href="p/sdparm_0.97-0.1_i386.deb">sdparm_0.97-0.1_i386.deb</a> </td>
2226      <td style="vertical-align: top;"><br>
2227      </td>
2228    </tr>
2229    <tr>
2230      <td style="vertical-align: top;"><span style="font-weight: bold;">0.98</span><br>
2231      </td>
2232      <td style="vertical-align: top;"><a href="p/sdparm-0.98.tgz">sdparm-0.98.tgz</a></td>
2233      <td style="vertical-align: top;"><a
2234 href="p/sdparm-0.98-1.i386.rpm">sdparm-0.98-1.i386.rpm</a> </td>
2235      <td style="vertical-align: top;"><a
2236 href="p/sdparm_0.98-0.1_i386.deb">sdparm_0.98-0.1_i386.deb</a> </td>
2237      <td style="vertical-align: top;"><br>
2238      </td>
2239    </tr>
2240    <tr>
2241      <td style="vertical-align: top;"><span style="font-weight: bold;">0.99</span><br>
2242      </td>
2243      <td style="vertical-align: top;"><a href="p/sdparm-0.99.tgz">sdparm-0.99.tgz</a></td>
2244      <td style="vertical-align: top;"><a
2245 href="p/sdparm-0.99-1.i386.rpm">sdparm-0.99-1.i386.rpm</a> </td>
2246      <td style="vertical-align: top;"><a
2247 href="p/sdparm_0.99-0.1_i386.deb">sdparm_0.99-0.1_i386.deb</a> </td>
2248      <td style="vertical-align: top;"><br>
2249      </td>
2250    </tr>
2251    <tr>
2252      <td style="vertical-align: top;"><span style="font-weight: bold;">1.00</span><br>
2253      </td>
2254      <td style="vertical-align: top;"><a href="p/sdparm-1.00.tgz">sdparm-1.00.tgz</a>
2255      </td>
2256      <td style="vertical-align: top;"><a
2257 href="p/sdparm-1.00-1.i386.rpm">sdparm-1.00-1.i386.rpm</a> </td>
2258      <td style="vertical-align: top;"><a
2259 href="p/sdparm_1.00-0.1_i386.deb">sdparm_1.00-0.1_i386.deb</a> </td>
2260      <td style="vertical-align: top;"><br>
2261      </td>
2262    </tr>
2263    <tr>
2264      <td style="vertical-align: top;"><span style="font-weight: bold;">1.01</span><br>
2265      </td>
2266      <td style="vertical-align: top;"><a href="p/sdparm-1.01.tgz">sdparm-1.01.tgz</a></td>
2267      <td style="vertical-align: top;"><a
2268 href="p/sdparm-1.01-1.i386.rpm">sdparm-1.01-1.i386.rpm</a> </td>
2269      <td style="vertical-align: top;"><a
2270 href="p/sdparm_1.01-0.1_i386.deb">sdparm_1.01-0.1_i386.deb</a> </td>
2271      <td style="vertical-align: top;"><a href="p/sdparm101.exe">sdparm101.exe</a></td>
2272    </tr>
2273    <tr>
2274      <td style="vertical-align: top;"><span style="font-weight: bold;">1.02</span><br>
2275      </td>
2276      <td style="vertical-align: top;"><a href="p/sdparm-1.02.tgz">sdparm-1.02.tgz</a></td>
2277      <td style="vertical-align: top;"><a
2278 href="p/sdparm-1.02-1.i386.rpm">sdparm-1.02-1.i386.rpm</a> </td>
2279      <td style="vertical-align: top;"><a
2280 href="p/sdparm_1.02-0.1_i386.deb">sdparm_1.02-0.1_i386.deb</a> </td>
2281      <td style="vertical-align: top;"><a href="p/sdparm.exe">sdparm.exe</a>
2282      </td>
2283    </tr>
2284  </tbody>
2285</table>
2286<br>
2287The tarball contains an "rpm" spec file which is used to build source
2288rpm and the i386 binary rpm. The alien utility was used to build the
2289"deb" package from the i386 binary rpm up till version 0.94 . Later
2290versions have debian package build infrastructure (see INSTALL). The
2291Windows ".exe" was built on Windows 2000 with MinGW. Here
2292is
2293the <a href="p/sdparm.ChangeLog">ChangeLog</a> .<br>
2294<br>
2295The sdparm "man" page is online: <a href="sdparm.8.html">sdparm.8.html</a>
2296.<br>
2297<br>
2298** Some browsers (e.g. firefox) may interpret a file with an extension
2299of "rpm" as an audio file. In which case press the right button over
2300the link and select "Save link as ..." to download the file.<br>
2301<h2><a class="mozTocH2" name="mozTocId633593"></a>To do<br>
2302</h2>
2303The author hopes a GUI wrapping this utility (or using it as a library)
2304will emerge. SCSI mode pages especially lend themselves to a GUI
2305representation similar to the table representations found in the SCSI
2306(draft) standards and vendors' product manuals.<br>
2307<br>
2308<p>Return to <a href="index.html">main</a> page. </p>
2309<center>
2310<p>Last updated: 7th October 2007<br>
2311<br>
2312</p>
2313</center>
2314</body>
2315</html>
2316