xref: /freebsd/sbin/camcontrol/camcontrol.8 (revision b9dd559a32017d95704025e24e8e9bea4a90c00f)
1525689f1SJustin T. Gibbs.\"
2f553b7b3SKenneth D. Merry.\" Copyright (c) 1998, 1999, 2000, 2002, 2005, 2006, 2007 Kenneth D. Merry.
3525689f1SJustin T. Gibbs.\" All rights reserved.
4525689f1SJustin T. Gibbs.\"
5525689f1SJustin T. Gibbs.\" Redistribution and use in source and binary forms, with or without
6525689f1SJustin T. Gibbs.\" modification, are permitted provided that the following conditions
7525689f1SJustin T. Gibbs.\" are met:
8525689f1SJustin T. Gibbs.\" 1. Redistributions of source code must retain the above copyright
9525689f1SJustin T. Gibbs.\"    notice, this list of conditions and the following disclaimer.
10525689f1SJustin T. Gibbs.\" 2. Redistributions in binary form must reproduce the above copyright
11525689f1SJustin T. Gibbs.\"    notice, this list of conditions and the following disclaimer in the
12525689f1SJustin T. Gibbs.\"    documentation and/or other materials provided with the distribution.
13525689f1SJustin T. Gibbs.\" 3. The name of the author may not be used to endorse or promote products
14525689f1SJustin T. Gibbs.\"    derived from this software without specific prior written permission.
15525689f1SJustin T. Gibbs.\"
16525689f1SJustin T. Gibbs.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17525689f1SJustin T. Gibbs.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18525689f1SJustin T. Gibbs.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19525689f1SJustin T. Gibbs.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20525689f1SJustin T. Gibbs.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21525689f1SJustin T. Gibbs.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22525689f1SJustin T. Gibbs.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23525689f1SJustin T. Gibbs.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24525689f1SJustin T. Gibbs.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25525689f1SJustin T. Gibbs.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26525689f1SJustin T. Gibbs.\" SUCH DAMAGE.
27525689f1SJustin T. Gibbs.\"
287f3dea24SPeter Wemm.\" $FreeBSD$
29525689f1SJustin T. Gibbs.\"
30aefae9c7SKenneth D. Merry.Dd May 3, 2017
31525689f1SJustin T. Gibbs.Dt CAMCONTROL 8
3233fab22eSKenneth D. Merry.Os
33525689f1SJustin T. Gibbs.Sh NAME
34525689f1SJustin T. Gibbs.Nm camcontrol
35525689f1SJustin T. Gibbs.Nd CAM control program
36525689f1SJustin T. Gibbs.Sh SYNOPSIS
377c7fb079SRuslan Ermilov.Nm
3833fab22eSKenneth D. Merry.Aq Ar command
39c60e19a8SKenneth D. Merry.Op device id
40525689f1SJustin T. Gibbs.Op generic args
41525689f1SJustin T. Gibbs.Op command args
427c7fb079SRuslan Ermilov.Nm
4333fab22eSKenneth D. Merry.Ic devlist
4456dc4e72SScott Long.Op Fl b
45525689f1SJustin T. Gibbs.Op Fl v
467c7fb079SRuslan Ermilov.Nm
4733fab22eSKenneth D. Merry.Ic periphlist
48c60e19a8SKenneth D. Merry.Op device id
49525689f1SJustin T. Gibbs.Op Fl n Ar dev_name
50525689f1SJustin T. Gibbs.Op Fl u Ar unit_number
517c7fb079SRuslan Ermilov.Nm
5233fab22eSKenneth D. Merry.Ic tur
53c60e19a8SKenneth D. Merry.Op device id
54525689f1SJustin T. Gibbs.Op generic args
557c7fb079SRuslan Ermilov.Nm
5633fab22eSKenneth D. Merry.Ic inquiry
57c60e19a8SKenneth D. Merry.Op device id
58525689f1SJustin T. Gibbs.Op generic args
59525689f1SJustin T. Gibbs.Op Fl D
60525689f1SJustin T. Gibbs.Op Fl S
61525689f1SJustin T. Gibbs.Op Fl R
627c7fb079SRuslan Ermilov.Nm
6352c9ce25SScott Long.Ic identify
6452c9ce25SScott Long.Op device id
6552c9ce25SScott Long.Op generic args
66757e402dSAlexander Motin.Op Fl v
6752c9ce25SScott Long.Nm
6842cb6a80SKenneth D. Merry.Ic reportluns
6942cb6a80SKenneth D. Merry.Op device id
7042cb6a80SKenneth D. Merry.Op generic args
7142cb6a80SKenneth D. Merry.Op Fl c
7242cb6a80SKenneth D. Merry.Op Fl l
7342cb6a80SKenneth D. Merry.Op Fl r Ar reporttype
7442cb6a80SKenneth D. Merry.Nm
75f553b7b3SKenneth D. Merry.Ic readcap
76f553b7b3SKenneth D. Merry.Op device id
77f553b7b3SKenneth D. Merry.Op generic args
78f553b7b3SKenneth D. Merry.Op Fl b
79f553b7b3SKenneth D. Merry.Op Fl h
80f553b7b3SKenneth D. Merry.Op Fl H
81*b9dd559aSWarner Losh.Op Fl l
82f553b7b3SKenneth D. Merry.Op Fl N
83f553b7b3SKenneth D. Merry.Op Fl q
84f553b7b3SKenneth D. Merry.Op Fl s
85f553b7b3SKenneth D. Merry.Nm
8633fab22eSKenneth D. Merry.Ic start
87c60e19a8SKenneth D. Merry.Op device id
88525689f1SJustin T. Gibbs.Op generic args
897c7fb079SRuslan Ermilov.Nm
9033fab22eSKenneth D. Merry.Ic stop
91c60e19a8SKenneth D. Merry.Op device id
92525689f1SJustin T. Gibbs.Op generic args
937c7fb079SRuslan Ermilov.Nm
94f9cecca2SMatthew N. Dodd.Ic load
95f9cecca2SMatthew N. Dodd.Op device id
96f9cecca2SMatthew N. Dodd.Op generic args
97f9cecca2SMatthew N. Dodd.Nm
9833fab22eSKenneth D. Merry.Ic eject
99c60e19a8SKenneth D. Merry.Op device id
100525689f1SJustin T. Gibbs.Op generic args
1017c7fb079SRuslan Ermilov.Nm
102d68fae58SEdward Tomasz Napierala.Ic reprobe
103d68fae58SEdward Tomasz Napierala.Op device id
104d68fae58SEdward Tomasz Napierala.Nm
10533fab22eSKenneth D. Merry.Ic rescan
10636d0fa44SKenneth D. Merry.Aq all | device id | bus Ns Op :target:lun
1077c7fb079SRuslan Ermilov.Nm
10833fab22eSKenneth D. Merry.Ic reset
10936d0fa44SKenneth D. Merry.Aq all | device id | bus Ns Op :target:lun
1107c7fb079SRuslan Ermilov.Nm
11133fab22eSKenneth D. Merry.Ic defects
112c60e19a8SKenneth D. Merry.Op device id
113525689f1SJustin T. Gibbs.Op generic args
114525689f1SJustin T. Gibbs.Aq Fl f Ar format
115525689f1SJustin T. Gibbs.Op Fl P
116525689f1SJustin T. Gibbs.Op Fl G
117a1736be3SKenneth D. Merry.Op Fl q
118a1736be3SKenneth D. Merry.Op Fl s
119a1736be3SKenneth D. Merry.Op Fl S Ar offset
120a1736be3SKenneth D. Merry.Op Fl X
1217c7fb079SRuslan Ermilov.Nm
12233fab22eSKenneth D. Merry.Ic modepage
123c60e19a8SKenneth D. Merry.Op device id
124525689f1SJustin T. Gibbs.Op generic args
12554644e21SAlexander Motin.Aq Fl m Ar page[,subpage] | Fl l
1261ac2383cSBill Fumerola.Op Fl P Ar pgctl
1277e32b20dSKelly Yancey.Op Fl b | Fl e
128525689f1SJustin T. Gibbs.Op Fl d
1297c7fb079SRuslan Ermilov.Nm
13033fab22eSKenneth D. Merry.Ic cmd
131c60e19a8SKenneth D. Merry.Op device id
132525689f1SJustin T. Gibbs.Op generic args
13380976615SAlexander Motin.Aq Fl a Ar cmd Op args
134525689f1SJustin T. Gibbs.Aq Fl c Ar cmd Op args
135f930c0dbSAlexander Motin.Op Fl d
136f930c0dbSAlexander Motin.Op Fl f
137525689f1SJustin T. Gibbs.Op Fl i Ar len Ar fmt
138525689f1SJustin T. Gibbs.Bk -words
139525689f1SJustin T. Gibbs.Op Fl o Ar len Ar fmt Op args
14080976615SAlexander Motin.Op Fl r Ar fmt
141525689f1SJustin T. Gibbs.Ek
1427c7fb079SRuslan Ermilov.Nm
14306e79492SKenneth D. Merry.Ic smpcmd
14406e79492SKenneth D. Merry.Op device id
14506e79492SKenneth D. Merry.Op generic args
14606e79492SKenneth D. Merry.Aq Fl r Ar len Ar fmt Op args
14706e79492SKenneth D. Merry.Aq Fl R Ar len Ar fmt Op args
14806e79492SKenneth D. Merry.Nm
14906e79492SKenneth D. Merry.Ic smprg
15006e79492SKenneth D. Merry.Op device id
15106e79492SKenneth D. Merry.Op generic args
15206e79492SKenneth D. Merry.Op Fl l
15306e79492SKenneth D. Merry.Nm
15406e79492SKenneth D. Merry.Ic smppc
15506e79492SKenneth D. Merry.Op device id
15606e79492SKenneth D. Merry.Op generic args
15706e79492SKenneth D. Merry.Aq Fl p Ar phy
15806e79492SKenneth D. Merry.Op Fl l
15906e79492SKenneth D. Merry.Op Fl o Ar operation
16006e79492SKenneth D. Merry.Op Fl d Ar name
16106e79492SKenneth D. Merry.Op Fl m Ar rate
16206e79492SKenneth D. Merry.Op Fl M Ar rate
16306e79492SKenneth D. Merry.Op Fl T Ar pp_timeout
16406e79492SKenneth D. Merry.Op Fl a Ar enable|disable
16506e79492SKenneth D. Merry.Op Fl A Ar enable|disable
16606e79492SKenneth D. Merry.Op Fl s Ar enable|disable
16706e79492SKenneth D. Merry.Op Fl S Ar enable|disable
16806e79492SKenneth D. Merry.Nm
16906e79492SKenneth D. Merry.Ic smpphylist
17006e79492SKenneth D. Merry.Op device id
17106e79492SKenneth D. Merry.Op generic args
17206e79492SKenneth D. Merry.Op Fl l
17306e79492SKenneth D. Merry.Op Fl q
17406e79492SKenneth D. Merry.Nm
17506e79492SKenneth D. Merry.Ic smpmaninfo
17606e79492SKenneth D. Merry.Op device id
17706e79492SKenneth D. Merry.Op generic args
17806e79492SKenneth D. Merry.Op Fl l
17906e79492SKenneth D. Merry.Nm
18033fab22eSKenneth D. Merry.Ic debug
181525689f1SJustin T. Gibbs.Op Fl I
182a7e5261eSNate Lawson.Op Fl P
183525689f1SJustin T. Gibbs.Op Fl T
184525689f1SJustin T. Gibbs.Op Fl S
185a7e5261eSNate Lawson.Op Fl X
18694d09127SKenneth D. Merry.Op Fl c
187fbfb753fSAlexander Motin.Op Fl p
188525689f1SJustin T. Gibbs.Aq all|off|bus Ns Op :target Ns Op :lun
1897c7fb079SRuslan Ermilov.Nm
19033fab22eSKenneth D. Merry.Ic tags
191c60e19a8SKenneth D. Merry.Op device id
1929deea857SKenneth D. Merry.Op generic args
1939deea857SKenneth D. Merry.Op Fl N Ar tags
1949deea857SKenneth D. Merry.Op Fl q
1959deea857SKenneth D. Merry.Op Fl v
1967c7fb079SRuslan Ermilov.Nm
19733fab22eSKenneth D. Merry.Ic negotiate
198c60e19a8SKenneth D. Merry.Op device id
1999deea857SKenneth D. Merry.Op generic args
2009deea857SKenneth D. Merry.Op Fl c
2019deea857SKenneth D. Merry.Op Fl D Ar enable|disable
202b447e682SAlexander Motin.Op Fl M Ar mode
2039deea857SKenneth D. Merry.Op Fl O Ar offset
2049deea857SKenneth D. Merry.Op Fl q
2059deea857SKenneth D. Merry.Op Fl R Ar syncrate
2069deea857SKenneth D. Merry.Op Fl T Ar enable|disable
2079deea857SKenneth D. Merry.Op Fl U
2089deea857SKenneth D. Merry.Op Fl W Ar bus_width
2099deea857SKenneth D. Merry.Op Fl v
2107c7fb079SRuslan Ermilov.Nm
21133fab22eSKenneth D. Merry.Ic format
21296a93c63SKenneth D. Merry.Op device id
21396a93c63SKenneth D. Merry.Op generic args
21496a93c63SKenneth D. Merry.Op Fl q
215e9e4d3e4SKenneth D. Merry.Op Fl r
21696a93c63SKenneth D. Merry.Op Fl w
21796a93c63SKenneth D. Merry.Op Fl y
2187c7fb079SRuslan Ermilov.Nm
219ffead710SBryan Venteicher.Ic sanitize
220ffead710SBryan Venteicher.Op device id
221ffead710SBryan Venteicher.Op generic args
222ffead710SBryan Venteicher.Aq Fl a Ar overwrite | block | crypto | exitfailure
223ffead710SBryan Venteicher.Op Fl c Ar passes
224ffead710SBryan Venteicher.Op Fl I
225ffead710SBryan Venteicher.Op Fl P Ar pattern
226ffead710SBryan Venteicher.Op Fl q
227ffead710SBryan Venteicher.Op Fl U
228ffead710SBryan Venteicher.Op Fl r
229ffead710SBryan Venteicher.Op Fl w
230ffead710SBryan Venteicher.Op Fl y
231ffead710SBryan Venteicher.Nm
23250c9a276SAlexander Motin.Ic idle
23350c9a276SAlexander Motin.Op device id
23450c9a276SAlexander Motin.Op generic args
23550c9a276SAlexander Motin.Op Fl t Ar time
23650c9a276SAlexander Motin.Nm
23750c9a276SAlexander Motin.Ic standby
23850c9a276SAlexander Motin.Op device id
23950c9a276SAlexander Motin.Op generic args
24050c9a276SAlexander Motin.Op Fl t Ar time
24150c9a276SAlexander Motin.Nm
24250c9a276SAlexander Motin.Ic sleep
24350c9a276SAlexander Motin.Op device id
24450c9a276SAlexander Motin.Op generic args
24550c9a276SAlexander Motin.Nm
246e7affda5SAlexander Motin.Ic apm
247e7affda5SAlexander Motin.Op device id
248e7affda5SAlexander Motin.Op generic args
249e7affda5SAlexander Motin.Op Fl l Ar level
250e7affda5SAlexander Motin.Nm
251e7affda5SAlexander Motin.Ic aam
252e7affda5SAlexander Motin.Op device id
253e7affda5SAlexander Motin.Op generic args
254e7affda5SAlexander Motin.Op Fl l Ar level
255e7affda5SAlexander Motin.Nm
2561f4782a4SEd Maste.Ic fwdownload
2571f4782a4SEd Maste.Op device id
2581f4782a4SEd Maste.Op generic args
2591f4782a4SEd Maste.Aq Fl f Ar fw_image
2600e358df0SKenneth D. Merry.Op Fl q
2611f4782a4SEd Maste.Op Fl s
2620e358df0SKenneth D. Merry.Op Fl y
2631f4782a4SEd Maste.Nm
2641146874aSSteven Hartland.Ic security
2651146874aSSteven Hartland.Op device id
2661146874aSSteven Hartland.Op generic args
2671146874aSSteven Hartland.Op Fl d Ar pwd
2681146874aSSteven Hartland.Op Fl e Ar pwd
2691146874aSSteven Hartland.Op Fl f
2701146874aSSteven Hartland.Op Fl h Ar pwd
2711146874aSSteven Hartland.Op Fl k Ar pwd
2721146874aSSteven Hartland.Op Fl l Ar high|maximum
2731146874aSSteven Hartland.Op Fl q
2741146874aSSteven Hartland.Op Fl s Ar pwd
2751146874aSSteven Hartland.Op Fl T Ar timeout
2761146874aSSteven Hartland.Op Fl U Ar user|master
2771146874aSSteven Hartland.Op Fl y
2781146874aSSteven Hartland.Nm
2799e68761cSSteven Hartland.Ic hpa
2809e68761cSSteven Hartland.Op device id
2819e68761cSSteven Hartland.Op generic args
2829e68761cSSteven Hartland.Op Fl f
2839e68761cSSteven Hartland.Op Fl l
2849e68761cSSteven Hartland.Op Fl P
2859e68761cSSteven Hartland.Op Fl p Ar pwd
2869e68761cSSteven Hartland.Op Fl q
2879e68761cSSteven Hartland.Op Fl s Ar max_sectors
2889e68761cSSteven Hartland.Op Fl U Ar pwd
2899e68761cSSteven Hartland.Op Fl y
2909e68761cSSteven Hartland.Nm
29108df2e3eSKenneth D. Merry.Ic persist
29208df2e3eSKenneth D. Merry.Op device id
29308df2e3eSKenneth D. Merry.Op generic args
29408df2e3eSKenneth D. Merry.Aq Fl i Ar action | Fl o Ar action
29508df2e3eSKenneth D. Merry.Op Fl a
29608df2e3eSKenneth D. Merry.Op Fl I Ar trans_id
29708df2e3eSKenneth D. Merry.Op Fl k Ar key
29808df2e3eSKenneth D. Merry.Op Fl K Ar sa_key
29908df2e3eSKenneth D. Merry.Op Fl p
30008df2e3eSKenneth D. Merry.Op Fl R Ar rel_tgt_port
30108df2e3eSKenneth D. Merry.Op Fl s Ar scope
30208df2e3eSKenneth D. Merry.Op Fl S
30308df2e3eSKenneth D. Merry.Op Fl T Ar res_type
30408df2e3eSKenneth D. Merry.Op Fl U
30508df2e3eSKenneth D. Merry.Nm
3065672fac9SKenneth D. Merry.Ic attrib
3075672fac9SKenneth D. Merry.Op device id
3085672fac9SKenneth D. Merry.Op generic args
3095672fac9SKenneth D. Merry.Aq Fl r Ar action | Fl w Ar attrib
3105672fac9SKenneth D. Merry.Op Fl a Ar attr_num
3115672fac9SKenneth D. Merry.Op Fl c
3125672fac9SKenneth D. Merry.Op Fl e Ar elem_addr
3135672fac9SKenneth D. Merry.Op Fl F Ar form1,form2
3145672fac9SKenneth D. Merry.Op Fl p Ar part
3155672fac9SKenneth D. Merry.Op Fl s Ar start_addr
3165672fac9SKenneth D. Merry.Op Fl T Ar elem_type
3175672fac9SKenneth D. Merry.Op Fl V Ar lv_num
3185672fac9SKenneth D. Merry.Nm
3190e358df0SKenneth D. Merry.Ic opcodes
3200e358df0SKenneth D. Merry.Op device id
3210e358df0SKenneth D. Merry.Op generic args
3220e358df0SKenneth D. Merry.Op Fl o Ar opcode
3230e358df0SKenneth D. Merry.Op Fl s Ar service_action
3240e358df0SKenneth D. Merry.Op Fl N
3250e358df0SKenneth D. Merry.Op Fl T
3260e358df0SKenneth D. Merry.Nm
3279a6844d5SKenneth D. Merry.Ic zone
3289a6844d5SKenneth D. Merry.Aq Fl c Ar cmd
3299a6844d5SKenneth D. Merry.Op Fl a
3309a6844d5SKenneth D. Merry.Op Fl l Ar lba
3319a6844d5SKenneth D. Merry.Op Fl o Ar rep_opts
3329a6844d5SKenneth D. Merry.Op Fl P Ar print_opts
3339a6844d5SKenneth D. Merry.Nm
3349a6844d5SKenneth D. Merry.Ic epc
3359a6844d5SKenneth D. Merry.Aq Fl c Ar cmd
3369a6844d5SKenneth D. Merry.Op Fl d
3379a6844d5SKenneth D. Merry.Op Fl D
3389a6844d5SKenneth D. Merry.Op Fl e
3399a6844d5SKenneth D. Merry.Op Fl H
3409a6844d5SKenneth D. Merry.Op Fl p Ar power_cond
3419a6844d5SKenneth D. Merry.Op Fl P
3429a6844d5SKenneth D. Merry.Op Fl r Ar restore_src
3439a6844d5SKenneth D. Merry.Op Fl s
3449a6844d5SKenneth D. Merry.Op Fl S Ar power_src
3459a6844d5SKenneth D. Merry.Op Fl T Ar timer
3469a6844d5SKenneth D. Merry.Nm
34728db0a5eSKenneth D. Merry.Ic timestamp
34828db0a5eSKenneth D. Merry.Op device id
34928db0a5eSKenneth D. Merry.Op generic args
35028db0a5eSKenneth D. Merry.Ao Fl r Oo Ns Fl f Ar format | Fl m | Fl U Oc | Fl s Ao Fl f Ar format Fl T Ar time | Fl U Ac Ac
35128db0a5eSKenneth D. Merry.Nm
35233fab22eSKenneth D. Merry.Ic help
353525689f1SJustin T. Gibbs.Sh DESCRIPTION
354e1205e80SPhilippe CharnierThe
3557c7fb079SRuslan Ermilov.Nm
356e1205e80SPhilippe Charnierutility is designed to provide a way for users to access and control the
35733fab22eSKenneth D. Merry.Fx
358525689f1SJustin T. GibbsCAM subsystem.
359525689f1SJustin T. Gibbs.Pp
360e1205e80SPhilippe CharnierThe
3617c7fb079SRuslan Ermilov.Nm
362e1205e80SPhilippe Charnierutility
3639806e231SRuslan Ermilovcan cause a loss of data and/or system crashes if used improperly.
3649806e231SRuslan ErmilovEven
3659deea857SKenneth D. Merryexpert users are encouraged to exercise caution when using this command.
366525689f1SJustin T. GibbsNovice users should stay away from this utility.
367525689f1SJustin T. Gibbs.Pp
368e1205e80SPhilippe CharnierThe
3697c7fb079SRuslan Ermilov.Nm
370e1205e80SPhilippe Charnierutility has a number of primary functions, many of which support an optional
3719806e231SRuslan Ermilovdevice identifier.
3729806e231SRuslan ErmilovA device identifier can take one of three forms:
3731252c1bbSRuslan Ermilov.Bl -tag -width 14n
374c60e19a8SKenneth D. Merry.It deviceUNIT
375c60e19a8SKenneth D. MerrySpecify a device name and unit number combination, like "da5" or "cd3".
376c60e19a8SKenneth D. Merry.It bus:target
3779806e231SRuslan ErmilovSpecify a bus number and target id.
3789806e231SRuslan ErmilovThe bus number can be determined from
379c60e19a8SKenneth D. Merrythe output of
380c60e19a8SKenneth D. Merry.Dq camcontrol devlist .
381c60e19a8SKenneth D. MerryThe lun defaults to 0.
382c60e19a8SKenneth D. Merry.It bus:target:lun
3839806e231SRuslan ErmilovSpecify the bus, target and lun for a device.
3849806e231SRuslan Ermilov(e.g.\& 1:2:0)
385c60e19a8SKenneth D. Merry.El
386c60e19a8SKenneth D. Merry.Pp
387c60e19a8SKenneth D. MerryThe device identifier, if it is specified,
388c60e19a8SKenneth D. Merry.Em must
389c60e19a8SKenneth D. Merrycome immediately after the function name, and before any generic or
3909806e231SRuslan Ermilovfunction-specific arguments.
3919806e231SRuslan ErmilovNote that the
392c60e19a8SKenneth D. Merry.Fl n
393c60e19a8SKenneth D. Merryand
394c60e19a8SKenneth D. Merry.Fl u
395c60e19a8SKenneth D. Merryarguments described below will override any device name or unit number
3969806e231SRuslan Ermilovspecified beforehand.
3979806e231SRuslan ErmilovThe
398c60e19a8SKenneth D. Merry.Fl n
399c60e19a8SKenneth D. Merryand
400c60e19a8SKenneth D. Merry.Fl u
401c60e19a8SKenneth D. Merryarguments will
402c60e19a8SKenneth D. Merry.Em not
40396a93c63SKenneth D. Merryoverride a specified bus:target or bus:target:lun, however.
404c60e19a8SKenneth D. Merry.Pp
405c60e19a8SKenneth D. MerryMost of the
4067c7fb079SRuslan Ermilov.Nm
407c60e19a8SKenneth D. Merryprimary functions support these generic arguments:
4081252c1bbSRuslan Ermilov.Bl -tag -width 14n
409525689f1SJustin T. Gibbs.It Fl C Ar count
4109806e231SRuslan ErmilovSCSI command retry count.
4119806e231SRuslan ErmilovIn order for this to work, error recovery
4121252c1bbSRuslan Ermilov.Pq Fl E
413525689f1SJustin T. Gibbsmust be turned on.
414525689f1SJustin T. Gibbs.It Fl E
415525689f1SJustin T. GibbsInstruct the kernel to perform generic SCSI error recovery for the given
4169806e231SRuslan Ermilovcommand.
4179806e231SRuslan ErmilovThis is needed in order for the retry count
4181252c1bbSRuslan Ermilov.Pq Fl C
4199806e231SRuslan Ermilovto be honored.
4209806e231SRuslan ErmilovOther than retrying commands, the generic error recovery in
421525689f1SJustin T. Gibbsthe code will generally attempt to spin up drives that are not spinning.
422525689f1SJustin T. GibbsIt may take some other actions, depending upon the sense code returned from
423525689f1SJustin T. Gibbsthe command.
424525689f1SJustin T. Gibbs.It Fl n Ar dev_name
4259806e231SRuslan ErmilovSpecify the device type to operate on, e.g.\& "da", "cd".
426492a2ef5SKenneth D. Merry.It Fl Q Ar task_attr
427492a2ef5SKenneth D. Merry.Tn SCSI
428492a2ef5SKenneth D. Merrytask attribute for the command, if it is a
429492a2ef5SKenneth D. Merry.Tn SCSI
430492a2ef5SKenneth D. Merrycommand.
431492a2ef5SKenneth D. MerryThis may be ordered, simple, head, or aca.
432492a2ef5SKenneth D. MerryIn most cases this is not needed.
433492a2ef5SKenneth D. MerryThe default is simple, which works with all
434492a2ef5SKenneth D. Merry.Tn SCSI
435492a2ef5SKenneth D. Merrydevices.
436492a2ef5SKenneth D. MerryThe task attribute may also be specified numerically.
437525689f1SJustin T. Gibbs.It Fl t Ar timeout
4389806e231SRuslan ErmilovSCSI command timeout in seconds.
4399806e231SRuslan ErmilovThis overrides the default timeout for
440525689f1SJustin T. Gibbsany given command.
441525689f1SJustin T. Gibbs.It Fl u Ar unit_number
4429806e231SRuslan ErmilovSpecify the device unit number, e.g.\& "1", "5".
443525689f1SJustin T. Gibbs.It Fl v
444525689f1SJustin T. GibbsBe verbose, print out sense information for failed SCSI commands.
445525689f1SJustin T. Gibbs.El
446525689f1SJustin T. Gibbs.Pp
447d13d1cd2SKenneth D. MerryPrimary command functions:
448525689f1SJustin T. Gibbs.Bl -tag -width periphlist
44933fab22eSKenneth D. Merry.It Ic devlist
450525689f1SJustin T. GibbsList all physical devices (logical units) attached to the CAM subsystem.
451525689f1SJustin T. GibbsThis also includes a list of peripheral drivers attached to each device.
452525689f1SJustin T. GibbsWith the
453525689f1SJustin T. Gibbs.Fl v
454525689f1SJustin T. Gibbsargument, SCSI bus number, adapter name and unit numbers are printed as
455525689f1SJustin T. Gibbswell.
45656dc4e72SScott LongOn the other hand, with the
45756dc4e72SScott Long.Fl b
45856dc4e72SScott Longargument, only the bus adapter, and unit information will be printed, and
45956dc4e72SScott Longdevice information will be omitted.
46033fab22eSKenneth D. Merry.It Ic periphlist
461525689f1SJustin T. GibbsList all peripheral drivers attached to a given physical device (logical
462525689f1SJustin T. Gibbsunit).
46333fab22eSKenneth D. Merry.It Ic tur
464525689f1SJustin T. GibbsSend the SCSI test unit ready (0x00) command to the given device.
465e1205e80SPhilippe CharnierThe
4667c7fb079SRuslan Ermilov.Nm
467e1205e80SPhilippe Charnierutility will report whether the device is ready or not.
46833fab22eSKenneth D. Merry.It Ic inquiry
4699806e231SRuslan ErmilovSend a SCSI inquiry command (0x12) to a device.
4709806e231SRuslan ErmilovBy default,
4717c7fb079SRuslan Ermilov.Nm
472525689f1SJustin T. Gibbswill print out the standard inquiry data, device serial number, and
4739806e231SRuslan Ermilovtransfer rate information.
4749806e231SRuslan ErmilovThe user can specify that only certain types of
475525689f1SJustin T. Gibbsinquiry data be printed:
4761252c1bbSRuslan Ermilov.Bl -tag -width 4n
477525689f1SJustin T. Gibbs.It Fl D
478525689f1SJustin T. GibbsGet the standard inquiry data.
479525689f1SJustin T. Gibbs.It Fl S
4809806e231SRuslan ErmilovPrint out the serial number.
4819806e231SRuslan ErmilovIf this flag is the only one specified,
4827c7fb079SRuslan Ermilov.Nm
483525689f1SJustin T. Gibbswill not print out "Serial Number" before the value returned by the drive.
484525689f1SJustin T. GibbsThis is to aid in script writing.
485525689f1SJustin T. Gibbs.It Fl R
486525689f1SJustin T. GibbsPrint out transfer rate information.
487525689f1SJustin T. Gibbs.El
48852c9ce25SScott Long.It Ic identify
48952c9ce25SScott LongSend a ATA identify command (0xec) to a device.
49042cb6a80SKenneth D. Merry.It Ic reportluns
49142cb6a80SKenneth D. MerrySend the SCSI REPORT LUNS (0xA0) command to the given device.
49242cb6a80SKenneth D. MerryBy default,
49342cb6a80SKenneth D. Merry.Nm
49442cb6a80SKenneth D. Merrywill print out the list of logical units (LUNs) supported by the target device.
49542cb6a80SKenneth D. MerryThere are a couple of options to modify the output:
4968266d476SRuslan Ermilov.Bl -tag -width 14n
49742cb6a80SKenneth D. Merry.It Fl c
49842cb6a80SKenneth D. MerryJust print out a count of LUNs, not the actual LUN numbers.
49942cb6a80SKenneth D. Merry.It Fl l
500b1edef17SJoel DahlJust print out the LUNs, and do not print out the count.
50142cb6a80SKenneth D. Merry.It Fl r Ar reporttype
50242cb6a80SKenneth D. MerrySpecify the type of report to request from the target:
50342cb6a80SKenneth D. Merry.Bl -tag -width 012345678
50442cb6a80SKenneth D. Merry.It default
50542cb6a80SKenneth D. MerryReturn the default report.
50642cb6a80SKenneth D. MerryThis is the
50742cb6a80SKenneth D. Merry.Nm
50842cb6a80SKenneth D. Merrydefault.
50942cb6a80SKenneth D. MerryMost targets will support this report if they support the REPORT LUNS
51042cb6a80SKenneth D. Merrycommand.
51142cb6a80SKenneth D. Merry.It wellknown
51242cb6a80SKenneth D. MerryReturn only well known LUNs.
51342cb6a80SKenneth D. Merry.It all
51442cb6a80SKenneth D. MerryReturn all available LUNs.
51542cb6a80SKenneth D. Merry.El
51642cb6a80SKenneth D. Merry.El
51742cb6a80SKenneth D. Merry.Pp
51842cb6a80SKenneth D. Merry.Nm
51942cb6a80SKenneth D. Merrywill try to print out LUN numbers in a reasonable format.
52042cb6a80SKenneth D. MerryIt can understand the peripheral, flat, LUN and extended LUN formats.
521f553b7b3SKenneth D. Merry.It Ic readcap
522f553b7b3SKenneth D. MerrySend the SCSI READ CAPACITY command to the given device and display
523f553b7b3SKenneth D. Merrythe results.
524f553b7b3SKenneth D. MerryIf the device is larger than 2TB, the SCSI READ CAPACITY (16) service
525f553b7b3SKenneth D. Merryaction will be sent to obtain the full size of the device.
526f553b7b3SKenneth D. MerryBy default,
527f553b7b3SKenneth D. Merry.Nm
528f553b7b3SKenneth D. Merrywill print out the last logical block of the device, and the blocksize of
529f553b7b3SKenneth D. Merrythe device in bytes.
530f553b7b3SKenneth D. MerryTo modify the output format, use the following options:
531f553b7b3SKenneth D. Merry.Bl -tag -width 5n
532f553b7b3SKenneth D. Merry.It Fl b
533f553b7b3SKenneth D. MerryJust print out the blocksize, not the last block or device size.
534f553b7b3SKenneth D. MerryThis cannot be used with
535f553b7b3SKenneth D. Merry.Fl N
536f553b7b3SKenneth D. Merryor
537f553b7b3SKenneth D. Merry.Fl s .
538f553b7b3SKenneth D. Merry.It Fl h
539f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 2, 1K == 1024) format.
540f553b7b3SKenneth D. MerryThis implies
541f553b7b3SKenneth D. Merry.Fl N
542f553b7b3SKenneth D. Merryand cannot be used with
543f553b7b3SKenneth D. Merry.Fl q
544f553b7b3SKenneth D. Merryor
545f553b7b3SKenneth D. Merry.Fl b .
546f553b7b3SKenneth D. Merry.It Fl H
547f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 10, 1K == 1000) format.
548*b9dd559aSWarner Losh.It Fl l
549*b9dd559aSWarner LoshSkip sending the SCSI READ CAPACITY (10) command.
550*b9dd559aSWarner LoshSend only the SCSI READ CAPACITY (16) service action and report
551*b9dd559aSWarner Loshits results.
552*b9dd559aSWarner LoshWhen the two do not match, a quirk is needed to resolve the ambiguity.
553f553b7b3SKenneth D. Merry.It Fl N
554f553b7b3SKenneth D. MerryPrint out the number of blocks in the device instead of the last logical
555f553b7b3SKenneth D. Merryblock.
556f553b7b3SKenneth D. Merry.It Fl q
557f553b7b3SKenneth D. MerryQuiet, print out the numbers only (separated by a comma if
558f553b7b3SKenneth D. Merry.Fl b
559f553b7b3SKenneth D. Merryor
560f553b7b3SKenneth D. Merry.Fl s
561f553b7b3SKenneth D. Merryare not specified).
562f553b7b3SKenneth D. Merry.It Fl s
563f553b7b3SKenneth D. MerryPrint out the last logical block or the size of the device only, and omit
564f553b7b3SKenneth D. Merrythe blocksize.
565f553b7b3SKenneth D. Merry.El
566d68fae58SEdward Tomasz Napierala.Pp
567d68fae58SEdward Tomasz NapieralaNote that this command only displays the information, it does not update
568d68fae58SEdward Tomasz Napieralathe kernel data structures.
569d68fae58SEdward Tomasz NapieralaUse the
570d68fae58SEdward Tomasz Napierala.Nm
571d68fae58SEdward Tomasz Napieralareprobe subcommand to do that.
57233fab22eSKenneth D. Merry.It Ic start
573525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the
574525689f1SJustin T. Gibbsstart bit set.
57533fab22eSKenneth D. Merry.It Ic stop
576525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the
577525689f1SJustin T. Gibbsstart bit cleared.
578f9cecca2SMatthew N. Dodd.It Ic load
579f9cecca2SMatthew N. DoddSend the SCSI Start/Stop Unit (0x1B) command to the given device with the
580f9cecca2SMatthew N. Doddstart bit set and the load/eject bit set.
58133fab22eSKenneth D. Merry.It Ic eject
582525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the
583f9cecca2SMatthew N. Doddstart bit cleared and the load/eject bit set.
58433fab22eSKenneth D. Merry.It Ic rescan
585db4fcadfSConrad MeyerTell the kernel to scan all buses in the system (with the
5865710d224SKenneth D. Merry.Ar all
58736d0fa44SKenneth D. Merryargument), the given bus (XPT_SCAN_BUS), bus:target:lun or device
5889806e231SRuslan Ermilov(XPT_SCAN_LUN) for new devices or devices that have gone away.
5899806e231SRuslan ErmilovThe user
590db4fcadfSConrad Meyermay specify a scan of all buses, a single bus, or a lun.
5919806e231SRuslan ErmilovScanning all luns
5920227791bSRuslan Ermilovon a target is not supported.
59336d0fa44SKenneth D. Merry.Pp
59436d0fa44SKenneth D. MerryIf a device is specified by peripheral name and unit number, for instance
59536d0fa44SKenneth D. Merryda4, it may only be rescanned if that device currently exists in the CAM EDT
59636d0fa44SKenneth D. Merry(Existing Device Table).
59736d0fa44SKenneth D. MerryIf the device is no longer there (see
59836d0fa44SKenneth D. Merry.Nm
59936d0fa44SKenneth D. Merrydevlist ),
60036d0fa44SKenneth D. Merryyou must use the bus:target:lun form to rescan it.
601d68fae58SEdward Tomasz Napierala.It Ic reprobe
602d68fae58SEdward Tomasz NapieralaTell the kernel to refresh the information about the device and
603d68fae58SEdward Tomasz Napieralanotify the upper layer,
604d68fae58SEdward Tomasz Napierala.Xr GEOM 4 .
605d68fae58SEdward Tomasz NapieralaThis includes sending the SCSI READ CAPACITY command and updating
606d68fae58SEdward Tomasz Napieralathe disk size visible to the rest of the system.
60733fab22eSKenneth D. Merry.It Ic reset
608db4fcadfSConrad MeyerTell the kernel to reset all buses in the system (with the
6095710d224SKenneth D. Merry.Ar all
61036d0fa44SKenneth D. Merryargument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus
61136d0fa44SKenneth D. Merryreset for that bus, or to reset the given bus:target:lun or device
612a2a44836SMatt Jacob(XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after
613ef8f7ac9SSheldon Hearnconnecting to that device.
614ef8f7ac9SSheldon HearnNote that this can have a destructive impact
615a2a44836SMatt Jacobon the system.
61633fab22eSKenneth D. Merry.It Ic defects
617a1736be3SKenneth D. MerrySend the
618a1736be3SKenneth D. Merry.Tn SCSI
619a1736be3SKenneth D. MerryREAD DEFECT DATA (10) command (0x37) or the
620a1736be3SKenneth D. Merry.Tn SCSI
621a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command (0xB7) to the given device, and
622525689f1SJustin T. Gibbsprint out any combination of: the total number of defects, the primary
623525689f1SJustin T. Gibbsdefect list (PLIST), and the grown defect list (GLIST).
6241252c1bbSRuslan Ermilov.Bl -tag -width 11n
625525689f1SJustin T. Gibbs.It Fl f Ar format
626a1736be3SKenneth D. MerrySpecify the requested format of the defect list.
6279806e231SRuslan ErmilovThe format argument is
6289806e231SRuslan Ermilovrequired.
6299806e231SRuslan ErmilovMost drives support the physical sector format.
6309806e231SRuslan ErmilovSome drives
6319806e231SRuslan Ermilovsupport the logical block format.
6320227791bSRuslan ErmilovMany drives, if they do not support the
633525689f1SJustin T. Gibbsrequested format, return the data in an alternate format, along with sense
6340227791bSRuslan Ermilovinformation indicating that the requested data format is not supported.
635e1205e80SPhilippe CharnierThe
6367c7fb079SRuslan Ermilov.Nm
637e1205e80SPhilippe Charnierutility
638525689f1SJustin T. Gibbsattempts to detect this, and print out whatever format the drive returns.
6390227791bSRuslan ErmilovIf the drive uses a non-standard sense code to report that it does not
640525689f1SJustin T. Gibbssupport the requested format,
6417c7fb079SRuslan Ermilov.Nm
642525689f1SJustin T. Gibbswill probably see the error as a failure to complete the request.
643a1736be3SKenneth D. Merry.Pp
644a1736be3SKenneth D. MerryThe format options are:
645a1736be3SKenneth D. Merry.Bl -tag -width 9n
646a1736be3SKenneth D. Merry.It block
647a1736be3SKenneth D. MerryPrint out the list as logical blocks.
648a1736be3SKenneth D. MerryThis is limited to 32-bit block sizes, and isn't supported by many modern
649a1736be3SKenneth D. Merrydrives.
650a1736be3SKenneth D. Merry.It longblock
651a1736be3SKenneth D. MerryPrint out the list as logical blocks.
652a1736be3SKenneth D. MerryThis option uses a 64-bit block size.
653a1736be3SKenneth D. Merry.It bfi
654a1736be3SKenneth D. MerryPrint out the list in bytes from index format.
655a1736be3SKenneth D. Merry.It extbfi
656a1736be3SKenneth D. MerryPrint out the list in extended bytes from index format.
657a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed.
658a1736be3SKenneth D. Merry.It phys
659a1736be3SKenneth D. MerryPrint out the list in physical sector format.
660a1736be3SKenneth D. MerryMost drives support this format.
661a1736be3SKenneth D. Merry.It extphys
662a1736be3SKenneth D. MerryPrint out the list in extended physical sector format.
663a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed.
664a1736be3SKenneth D. Merry.El
665525689f1SJustin T. Gibbs.It Fl G
6669806e231SRuslan ErmilovPrint out the grown defect list.
6679806e231SRuslan ErmilovThis is a list of bad blocks that have
668525689f1SJustin T. Gibbsbeen remapped since the disk left the factory.
669525689f1SJustin T. Gibbs.It Fl P
670525689f1SJustin T. GibbsPrint out the primary defect list.
671a1736be3SKenneth D. MerryThis is the list of defects that were present in the factory.
672a1736be3SKenneth D. Merry.It Fl q
673a1736be3SKenneth D. MerryWhen printing status information with
674a1736be3SKenneth D. Merry.Fl s ,
675a1736be3SKenneth D. Merryonly print the number of defects.
676a1736be3SKenneth D. Merry.It Fl s
677a1736be3SKenneth D. MerryJust print the number of defects, not the list of defects.
678a1736be3SKenneth D. Merry.It Fl S Ar offset
679a1736be3SKenneth D. MerrySpecify the starting offset into the defect list.
680a1736be3SKenneth D. MerryThis implies using the
681a1736be3SKenneth D. Merry.Tn SCSI
682a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command, as the 10 byte version of the command
683a1736be3SKenneth D. Merrydoesn't support the address descriptor index field.
684a1736be3SKenneth D. MerryNot all drives support the 12 byte command, and some drives that support
685a1736be3SKenneth D. Merrythe 12 byte command don't support the address descriptor index field.
686a1736be3SKenneth D. Merry.It Fl X
687a1736be3SKenneth D. MerryPrint out defects in hexadecimal (base 16) form instead of base 10 form.
688525689f1SJustin T. Gibbs.El
689525689f1SJustin T. Gibbs.Pp
690525689f1SJustin T. GibbsIf neither
691525689f1SJustin T. Gibbs.Fl P
692525689f1SJustin T. Gibbsnor
693525689f1SJustin T. Gibbs.Fl G
694525689f1SJustin T. Gibbsis specified,
6957c7fb079SRuslan Ermilov.Nm
696525689f1SJustin T. Gibbswill print out the number of defects given in the READ DEFECT DATA header
697525689f1SJustin T. Gibbsreturned from the drive.
6987027b9cdSKenneth D. MerrySome drives will report 0 defects if neither the primary or grown defect
6997027b9cdSKenneth D. Merrylists are requested.
70033fab22eSKenneth D. Merry.It Ic modepage
7019806e231SRuslan ErmilovAllows the user to display and optionally edit a SCSI mode page.
7029806e231SRuslan ErmilovThe mode
703525689f1SJustin T. Gibbspage formats are located in
704525689f1SJustin T. Gibbs.Pa /usr/share/misc/scsi_modes .
705525689f1SJustin T. GibbsThis can be overridden by specifying a different file in the
706525689f1SJustin T. Gibbs.Ev SCSI_MODES
70733fab22eSKenneth D. Merryenvironment variable.
70833fab22eSKenneth D. MerryThe
70933fab22eSKenneth D. Merry.Ic modepage
71033fab22eSKenneth D. Merrycommand takes several arguments:
7111252c1bbSRuslan Ermilov.Bl -tag -width 12n
7129deea857SKenneth D. Merry.It Fl d
713525689f1SJustin T. GibbsDisable block descriptors for mode sense.
7147e32b20dSKelly Yancey.It Fl b
7157e32b20dSKelly YanceyDisplays mode page data in binary format.
716525689f1SJustin T. Gibbs.It Fl e
7179806e231SRuslan ErmilovThis flag allows the user to edit values in the mode page.
7189806e231SRuslan ErmilovThe user may
7197e32b20dSKelly Yanceyeither edit mode page values with the text editor pointed to by his
7207e32b20dSKelly Yancey.Ev EDITOR
7217e32b20dSKelly Yanceyenvironment variable, or supply mode page values via standard input, using
7227e32b20dSKelly Yanceythe same format that
7237c7fb079SRuslan Ermilov.Nm
7249806e231SRuslan Ermilovuses to display mode page values.
7259806e231SRuslan ErmilovThe editor will be invoked if
7267c7fb079SRuslan Ermilov.Nm
7277e32b20dSKelly Yanceydetects that standard input is terminal.
7287e32b20dSKelly Yancey.It Fl l
7297e32b20dSKelly YanceyLists all available mode pages.
73054644e21SAlexander MotinIf specified more then once, also lists subpages.
73154644e21SAlexander Motin.It Fl m Ar page[,subpage]
73254644e21SAlexander MotinThis specifies the number of the mode page and optionally subpage the user
73354644e21SAlexander Motinwould like to view and/or edit.
7349806e231SRuslan ErmilovThis argument is mandatory unless
7359402dd99SKelly Yancey.Fl l
7369402dd99SKelly Yanceyis specified.
7371ac2383cSBill Fumerola.It Fl P Ar pgctl
7389806e231SRuslan ErmilovThis allows the user to specify the page control field.
7399806e231SRuslan ErmilovPossible values are:
740525689f1SJustin T. Gibbs.Bl -tag -width xxx -compact
74146a1f3b4SKenneth D. Merry.It 0
742525689f1SJustin T. GibbsCurrent values
74346a1f3b4SKenneth D. Merry.It 1
744525689f1SJustin T. GibbsChangeable values
74546a1f3b4SKenneth D. Merry.It 2
746525689f1SJustin T. GibbsDefault values
74746a1f3b4SKenneth D. Merry.It 3
748525689f1SJustin T. GibbsSaved values
749525689f1SJustin T. Gibbs.El
750525689f1SJustin T. Gibbs.El
75133fab22eSKenneth D. Merry.It Ic cmd
75280976615SAlexander MotinAllows the user to send an arbitrary ATA or SCSI CDB to any device.
75333fab22eSKenneth D. MerryThe
75433fab22eSKenneth D. Merry.Ic cmd
755525689f1SJustin T. Gibbsfunction requires the
756525689f1SJustin T. Gibbs.Fl c
75780976615SAlexander Motinargument to specify SCSI CDB or the
75880976615SAlexander Motin.Fl a
75980976615SAlexander Motinargument to specify ATA Command Block registers values.
7609806e231SRuslan ErmilovOther arguments are optional, depending on
7619806e231SRuslan Ermilovthe command type.
7629806e231SRuslan ErmilovThe command and data specification syntax is documented
763525689f1SJustin T. Gibbsin
76496a93c63SKenneth D. Merry.Xr cam_cdbparse 3 .
765a53bb70bSJoel DahlNOTE: If the CDB specified causes data to be transferred to or from the
766525689f1SJustin T. GibbsSCSI device in question, you MUST specify either
767525689f1SJustin T. Gibbs.Fl i
768525689f1SJustin T. Gibbsor
769525689f1SJustin T. Gibbs.Fl o .
7701252c1bbSRuslan Ermilov.Bl -tag -width 17n
77180976615SAlexander Motin.It Fl a Ar cmd Op args
77280976615SAlexander MotinThis specifies the content of 12 ATA Command Block registers (command,
77380976615SAlexander Motinfeatures, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp.
77480976615SAlexander Motinlba_high_exp, features_exp, sector_count, sector_count_exp).
775525689f1SJustin T. Gibbs.It Fl c Ar cmd Op args
7769806e231SRuslan ErmilovThis specifies the SCSI CDB.
77780976615SAlexander MotinSCSI CDBs may be 6, 10, 12 or 16 bytes.
778f930c0dbSAlexander Motin.It Fl d
779f930c0dbSAlexander MotinSpecifies DMA protocol to be used for ATA command.
780f930c0dbSAlexander Motin.It Fl f
781f930c0dbSAlexander MotinSpecifies FPDMA (NCQ) protocol to be used for ATA command.
782525689f1SJustin T. Gibbs.It Fl i Ar len Ar fmt
783525689f1SJustin T. GibbsThis specifies the amount of data to read, and how it should be displayed.
784525689f1SJustin T. GibbsIf the format is
785525689f1SJustin T. Gibbs.Sq - ,
786525689f1SJustin T. Gibbs.Ar len
787525689f1SJustin T. Gibbsbytes of data will be read from the device and written to standard output.
788525689f1SJustin T. Gibbs.It Fl o Ar len Ar fmt Op args
789525689f1SJustin T. GibbsThis specifies the amount of data to be written to a device, and the data
7909806e231SRuslan Ermilovthat is to be written.
7919806e231SRuslan ErmilovIf the format is
792525689f1SJustin T. Gibbs.Sq - ,
793525689f1SJustin T. Gibbs.Ar len
794525689f1SJustin T. Gibbsbytes of data will be read from standard input and written to the device.
79580976615SAlexander Motin.It Fl r Ar fmt
79680976615SAlexander MotinThis specifies that 11 result ATA Command Block registers should be displayed
79780976615SAlexander Motin(status, error, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp,
79880976615SAlexander Motinlba_high_exp, sector_count, sector_count_exp), and how.
79980976615SAlexander MotinIf the format is
80080976615SAlexander Motin.Sq - ,
80180976615SAlexander Motin11 result registers will be written to standard output in hex.
802525689f1SJustin T. Gibbs.El
80306e79492SKenneth D. Merry.It Ic smpcmd
80406e79492SKenneth D. MerryAllows the user to send an arbitrary Serial
80506e79492SKenneth D. MerryManagement Protocol (SMP) command to a device.
80606e79492SKenneth D. MerryThe
80706e79492SKenneth D. Merry.Ic smpcmd
80806e79492SKenneth D. Merryfunction requires the
80906e79492SKenneth D. Merry.Fl r
81006e79492SKenneth D. Merryargument to specify the SMP request to be sent, and the
81106e79492SKenneth D. Merry.Fl R
81206e79492SKenneth D. Merryargument to specify the format of the SMP response.
81306e79492SKenneth D. MerryThe syntax for the SMP request and response arguments is documented in
81406e79492SKenneth D. Merry.Xr cam_cdbparse 3 .
81506e79492SKenneth D. Merry.Pp
81606e79492SKenneth D. MerryNote that SAS adapters that support SMP passthrough (at least the currently
81706e79492SKenneth D. Merryknown adapters) do not accept CRC bytes from the user in the request and do
81806e79492SKenneth D. Merrynot pass CRC bytes back to the user in the response.
81906e79492SKenneth D. MerryTherefore users should not include the CRC bytes in the length of the
82006e79492SKenneth D. Merryrequest and not expect CRC bytes to be returned in the response.
82106e79492SKenneth D. Merry.Bl -tag -width 17n
82206e79492SKenneth D. Merry.It Fl r Ar len Ar fmt Op args
82306e79492SKenneth D. MerryThis specifies the size of the SMP request, without the CRC bytes, and the
8245bb17266SJoel DahlSMP request format.
8255bb17266SJoel DahlIf the format is
82606e79492SKenneth D. Merry.Sq - ,
82706e79492SKenneth D. Merry.Ar len
82806e79492SKenneth D. Merrybytes of data will be read from standard input and written as the SMP
82906e79492SKenneth D. Merryrequest.
83006e79492SKenneth D. Merry.It Fl R Ar len Ar fmt Op args
83106e79492SKenneth D. MerryThis specifies the size of the buffer allocated for the SMP response, and
83206e79492SKenneth D. Merrythe SMP response format.
83306e79492SKenneth D. MerryIf the format is
83406e79492SKenneth D. Merry.Sq - ,
83506e79492SKenneth D. Merry.Ar len
83606e79492SKenneth D. Merrybytes of data will be allocated for the response and the response will be
83706e79492SKenneth D. Merrywritten to standard output.
83806e79492SKenneth D. Merry.El
83906e79492SKenneth D. Merry.It Ic smprg
84006e79492SKenneth D. MerryAllows the user to send the Serial Management Protocol (SMP) Report General
84106e79492SKenneth D. Merrycommand to a device.
84206e79492SKenneth D. Merry.Nm
84306e79492SKenneth D. Merrywill display the data returned by the Report General command.
84406e79492SKenneth D. MerryIf the SMP target supports the long response format, the additional data
84506e79492SKenneth D. Merrywill be requested and displayed automatically.
84606e79492SKenneth D. Merry.Bl -tag -width 8n
84706e79492SKenneth D. Merry.It Fl l
84806e79492SKenneth D. MerryRequest the long response format only.
84906e79492SKenneth D. MerryNot all SMP targets support the long response format.
85006e79492SKenneth D. MerryThis option causes
85106e79492SKenneth D. Merry.Nm
85206e79492SKenneth D. Merryto skip sending the initial report general request without the long bit set
85306e79492SKenneth D. Merryand only issue a report general request with the long bit set.
85406e79492SKenneth D. Merry.El
85506e79492SKenneth D. Merry.It Ic smppc
85606e79492SKenneth D. MerryAllows the user to issue the Serial Management Protocol (SMP) PHY Control
85706e79492SKenneth D. Merrycommand to a device.
85806e79492SKenneth D. MerryThis function should be used with some caution, as it can render devices
85906e79492SKenneth D. Merryinaccessible, and could potentially cause data corruption as well.
86006e79492SKenneth D. MerryThe
86106e79492SKenneth D. Merry.Fl p
86206e79492SKenneth D. Merryargument is required to specify the PHY to operate on.
86306e79492SKenneth D. Merry.Bl -tag -width 17n
86406e79492SKenneth D. Merry.It Fl p Ar phy
86506e79492SKenneth D. MerrySpecify the PHY to operate on.
86606e79492SKenneth D. MerryThis argument is required.
86706e79492SKenneth D. Merry.It Fl l
86806e79492SKenneth D. MerryRequest the long request/response format.
86906e79492SKenneth D. MerryNot all SMP targets support the long response format.
87006e79492SKenneth D. MerryFor the PHY Control command, this currently only affects whether the
87106e79492SKenneth D. Merryrequest length is set to a value other than 0.
87206e79492SKenneth D. Merry.It Fl o Ar operation
87306e79492SKenneth D. MerrySpecify a PHY control operation.
87406e79492SKenneth D. MerryOnly one
87506e79492SKenneth D. Merry.Fl o
87606e79492SKenneth D. Merryoperation may be specified.
87706e79492SKenneth D. MerryThe operation may be specified numerically (in decimal, hexadecimal, or octal)
87806e79492SKenneth D. Merryor one of the following operation names may be specified:
87906e79492SKenneth D. Merry.Bl -tag -width 16n
88006e79492SKenneth D. Merry.It nop
88106e79492SKenneth D. MerryNo operation.
88206e79492SKenneth D. MerryIt is not necessary to specify this argument.
88306e79492SKenneth D. Merry.It linkreset
88406e79492SKenneth D. MerrySend the LINK RESET command to the phy.
88506e79492SKenneth D. Merry.It hardreset
88606e79492SKenneth D. MerrySend the HARD RESET command to the phy.
88706e79492SKenneth D. Merry.It disable
88806e79492SKenneth D. MerrySend the DISABLE command to the phy.
88906e79492SKenneth D. MerryNote that the LINK RESET or HARD RESET commands should re-enable the phy.
890ee5320f4SKenneth D. Merry.It clearerrlog
89106e79492SKenneth D. MerrySend the CLEAR ERROR LOG command.
89206e79492SKenneth D. MerryThis clears the error log counters for the specified phy.
89306e79492SKenneth D. Merry.It clearaffiliation
89406e79492SKenneth D. MerrySend the CLEAR AFFILIATION command.
89506e79492SKenneth D. MerryThis clears the affiliation from the STP initiator port with the same SAS
89606e79492SKenneth D. Merryaddress as the SMP initiator that requests the clear operation.
89706e79492SKenneth D. Merry.It sataportsel
89806e79492SKenneth D. MerrySend the TRANSMIT SATA PORT SELECTION SIGNAL command to the phy.
89906e79492SKenneth D. MerryThis will cause a SATA port selector to use the given phy as its active phy
90006e79492SKenneth D. Merryand make the other phy inactive.
90106e79492SKenneth D. Merry.It clearitnl
90206e79492SKenneth D. MerrySend the CLEAR STP I_T NEXUS LOSS command to the PHY.
90306e79492SKenneth D. Merry.It setdevname
90406e79492SKenneth D. MerrySend the SET ATTACHED DEVICE NAME command to the PHY.
90506e79492SKenneth D. MerryThis requires the
90606e79492SKenneth D. Merry.Fl d
90706e79492SKenneth D. Merryargument to specify the device name.
90806e79492SKenneth D. Merry.El
90906e79492SKenneth D. Merry.It Fl d Ar name
91006e79492SKenneth D. MerrySpecify the attached device name.
91106e79492SKenneth D. MerryThis option is needed with the
91206e79492SKenneth D. Merry.Fl o Ar setdevname
91306e79492SKenneth D. Merryphy operation.
91406e79492SKenneth D. MerryThe name is a 64-bit number, and can be specified in decimal, hexadecimal
91506e79492SKenneth D. Merryor octal format.
91606e79492SKenneth D. Merry.It Fl m Ar rate
91706e79492SKenneth D. MerrySet the minimum physical link rate for the phy.
91806e79492SKenneth D. MerryThis is a numeric argument.
91906e79492SKenneth D. MerryCurrently known link rates are:
92006e79492SKenneth D. Merry.Bl -tag -width 5n
92106e79492SKenneth D. Merry.It 0x0
92206e79492SKenneth D. MerryDo not change current value.
92306e79492SKenneth D. Merry.It 0x8
92406e79492SKenneth D. Merry1.5 Gbps
92506e79492SKenneth D. Merry.It 0x9
92606e79492SKenneth D. Merry3 Gbps
92706e79492SKenneth D. Merry.It 0xa
92806e79492SKenneth D. Merry6 Gbps
92906e79492SKenneth D. Merry.El
93006e79492SKenneth D. Merry.Pp
93106e79492SKenneth D. MerryOther values may be specified for newer physical link rates.
93206e79492SKenneth D. Merry.It Fl M Ar rate
93306e79492SKenneth D. MerrySet the maximum physical link rate for the phy.
93406e79492SKenneth D. MerryThis is a numeric argument.
93506e79492SKenneth D. MerrySee the
93606e79492SKenneth D. Merry.Fl m
93706e79492SKenneth D. Merryargument description for known link rate arguments.
93806e79492SKenneth D. Merry.It Fl T Ar pp_timeout
93906e79492SKenneth D. MerrySet the partial pathway timeout value, in microseconds.
94006e79492SKenneth D. MerrySee the
94106e79492SKenneth D. Merry.Tn ANSI
94206e79492SKenneth D. Merry.Tn SAS
94319769ec2SJoel DahlProtocol Layer (SPL)
94406e79492SKenneth D. Merryspecification for more information on this field.
94506e79492SKenneth D. Merry.It Fl a Ar enable|disable
94606e79492SKenneth D. MerryEnable or disable SATA slumber phy power conditions.
94706e79492SKenneth D. Merry.It Fl A Ar enable|disable
94806e79492SKenneth D. MerryEnable or disable SATA partial power conditions.
94906e79492SKenneth D. Merry.It Fl s Ar enable|disable
95006e79492SKenneth D. MerryEnable or disable SAS slumber phy power conditions.
95106e79492SKenneth D. Merry.It Fl S Ar enable|disable
95206e79492SKenneth D. MerryEnable or disable SAS partial phy power conditions.
95306e79492SKenneth D. Merry.El
95406e79492SKenneth D. Merry.It Ic smpphylist
95506e79492SKenneth D. MerryList phys attached to a SAS expander, the address of the end device
95606e79492SKenneth D. Merryattached to the phy, and the inquiry data for that device and peripheral
95706e79492SKenneth D. Merrydevices attached to that device.
95806e79492SKenneth D. MerryThe inquiry data and peripheral devices are displayed if available.
95906e79492SKenneth D. Merry.Bl -tag -width 5n
96006e79492SKenneth D. Merry.It Fl l
96106e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for
96206e79492SKenneth D. Merrythis command.
96306e79492SKenneth D. Merry.It Fl q
96406e79492SKenneth D. MerryOnly print out phys that are attached to a device in the CAM EDT (Existing
96506e79492SKenneth D. MerryDevice Table).
96606e79492SKenneth D. Merry.El
96706e79492SKenneth D. Merry.It Ic smpmaninfo
96806e79492SKenneth D. MerrySend the SMP Report Manufacturer Information command to the device and
96906e79492SKenneth D. Merrydisplay the response.
97006e79492SKenneth D. Merry.Bl -tag -width 5n
97106e79492SKenneth D. Merry.It Fl l
97206e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for
97306e79492SKenneth D. Merrythis command.
97406e79492SKenneth D. Merry.El
97533fab22eSKenneth D. Merry.It Ic debug
9769806e231SRuslan ErmilovTurn on CAM debugging printfs in the kernel.
9779806e231SRuslan ErmilovThis requires options CAMDEBUG
9789806e231SRuslan Ermilovin your kernel config file.
9799806e231SRuslan ErmilovWARNING: enabling debugging printfs currently
9809806e231SRuslan Ermilovcauses an EXTREME number of kernel printfs.
9819806e231SRuslan ErmilovYou may have difficulty
982525689f1SJustin T. Gibbsturning off the debugging printfs once they start, since the kernel will be
983525689f1SJustin T. Gibbsbusy printing messages and unable to service other requests quickly.
98433fab22eSKenneth D. MerryThe
98533fab22eSKenneth D. Merry.Ic debug
98633fab22eSKenneth D. Merryfunction takes a number of arguments:
9871252c1bbSRuslan Ermilov.Bl -tag -width 18n
988525689f1SJustin T. Gibbs.It Fl I
989525689f1SJustin T. GibbsEnable CAM_DEBUG_INFO printfs.
990a7e5261eSNate Lawson.It Fl P
991a7e5261eSNate LawsonEnable CAM_DEBUG_PERIPH printfs.
992525689f1SJustin T. Gibbs.It Fl T
993525689f1SJustin T. GibbsEnable CAM_DEBUG_TRACE printfs.
994525689f1SJustin T. Gibbs.It Fl S
995525689f1SJustin T. GibbsEnable CAM_DEBUG_SUBTRACE printfs.
996a7e5261eSNate Lawson.It Fl X
997a7e5261eSNate LawsonEnable CAM_DEBUG_XPT printfs.
998d05caa00SKenneth D. Merry.It Fl c
9999806e231SRuslan ErmilovEnable CAM_DEBUG_CDB printfs.
10009806e231SRuslan ErmilovThis will cause the kernel to print out the
1001d05caa00SKenneth D. MerrySCSI CDBs sent to the specified device(s).
1002fbfb753fSAlexander Motin.It Fl p
1003fbfb753fSAlexander MotinEnable CAM_DEBUG_PROBE printfs.
1004525689f1SJustin T. Gibbs.It all
1005525689f1SJustin T. GibbsEnable debugging for all devices.
1006525689f1SJustin T. Gibbs.It off
1007525689f1SJustin T. GibbsTurn off debugging for all devices
1008525689f1SJustin T. Gibbs.It bus Ns Op :target Ns Op :lun
10099806e231SRuslan ErmilovTurn on debugging for the given bus, target or lun.
10109806e231SRuslan ErmilovIf the lun or target
10119806e231SRuslan Ermilovand lun are not specified, they are wildcarded.
10129806e231SRuslan Ermilov(i.e., just specifying a
1013525689f1SJustin T. Gibbsbus turns on debugging printfs for all devices on that bus.)
1014525689f1SJustin T. Gibbs.El
101533fab22eSKenneth D. Merry.It Ic tags
10169deea857SKenneth D. MerryShow or set the number of "tagged openings" or simultaneous transactions
10179806e231SRuslan Ermilovwe attempt to queue to a particular device.
10189806e231SRuslan ErmilovBy default, the
101933fab22eSKenneth D. Merry.Ic tags
10209806e231SRuslan Ermilovcommand, with no command-specific arguments (i.e., only generic arguments)
10219deea857SKenneth D. Merryprints out the "soft" maximum number of transactions that can be queued to
10229806e231SRuslan Ermilovthe device in question.
10239806e231SRuslan ErmilovFor more detailed information, use the
10249deea857SKenneth D. Merry.Fl v
10259deea857SKenneth D. Merryargument described below.
10261252c1bbSRuslan Ermilov.Bl -tag -width 7n
10279deea857SKenneth D. Merry.It Fl N Ar tags
10289806e231SRuslan ErmilovSet the number of tags for the given device.
10299806e231SRuslan ErmilovThis must be between the
10309806e231SRuslan Ermilovminimum and maximum number set in the kernel quirk table.
10319806e231SRuslan ErmilovThe default for
10329deea857SKenneth D. Merrymost devices that support tagged queueing is a minimum of 2 and a maximum
10339806e231SRuslan Ermilovof 255.
10349806e231SRuslan ErmilovThe minimum and maximum values for a given device may be
10359deea857SKenneth D. Merrydetermined by using the
10369deea857SKenneth D. Merry.Fl v
10379806e231SRuslan Ermilovswitch.
10389806e231SRuslan ErmilovThe meaning of the
10399deea857SKenneth D. Merry.Fl v
10409deea857SKenneth D. Merryswitch for this
10417c7fb079SRuslan Ermilov.Nm
10429deea857SKenneth D. Merrysubcommand is described below.
10439deea857SKenneth D. Merry.It Fl q
10440227791bSRuslan ErmilovBe quiet, and do not report the number of tags.
10459806e231SRuslan ErmilovThis is generally used when
10469deea857SKenneth D. Merrysetting the number of tags.
10479deea857SKenneth D. Merry.It Fl v
10489deea857SKenneth D. MerryThe verbose flag has special functionality for the
10499deea857SKenneth D. Merry.Em tags
10509806e231SRuslan Ermilovargument.
10519806e231SRuslan ErmilovIt causes
10527c7fb079SRuslan Ermilov.Nm
10539deea857SKenneth D. Merryto print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB:
10541252c1bbSRuslan Ermilov.Bl -tag -width 13n
10559deea857SKenneth D. Merry.It dev_openings
10569deea857SKenneth D. MerryThis is the amount of capacity for transactions queued to a given device.
10579deea857SKenneth D. Merry.It dev_active
10589deea857SKenneth D. MerryThis is the number of transactions currently queued to a device.
10599deea857SKenneth D. Merry.It devq_openings
10609806e231SRuslan ErmilovThis is the kernel queue space for transactions.
10619806e231SRuslan ErmilovThis count usually mirrors
10629deea857SKenneth D. Merrydev_openings except during error recovery operations when
10639deea857SKenneth D. Merrythe device queue is frozen (device is not allowed to receive
10649deea857SKenneth D. Merrycommands), the number of dev_openings is reduced, or transaction
10659deea857SKenneth D. Merryreplay is occurring.
10669deea857SKenneth D. Merry.It devq_queued
10679deea857SKenneth D. MerryThis is the number of transactions waiting in the kernel queue for capacity
10689806e231SRuslan Ermilovon the device.
10699806e231SRuslan ErmilovThis number is usually zero unless error recovery is in
10709deea857SKenneth D. Merryprogress.
10719deea857SKenneth D. Merry.It held
10729deea857SKenneth D. MerryThe held count is the number of CCBs held by peripheral drivers that have
10739deea857SKenneth D. Merryeither just been completed or are about to be released to the transport
10749806e231SRuslan Ermilovlayer for service by a device.
10759806e231SRuslan ErmilovHeld CCBs reserve capacity on a given
10769deea857SKenneth D. Merrydevice.
10779deea857SKenneth D. Merry.It mintags
10789deea857SKenneth D. MerryThis is the current "hard" minimum number of transactions that can be
10799806e231SRuslan Ermilovqueued to a device at once.
10809806e231SRuslan ErmilovThe
10819deea857SKenneth D. Merry.Ar dev_openings
10829806e231SRuslan Ermilovvalue above cannot go below this number.
10839806e231SRuslan ErmilovThe default value for
10849deea857SKenneth D. Merry.Ar mintags
10859deea857SKenneth D. Merryis 2, although it may be set higher or lower for various devices.
10869deea857SKenneth D. Merry.It maxtags
10879deea857SKenneth D. MerryThis is the "hard" maximum number of transactions that can be queued to a
10889806e231SRuslan Ermilovdevice at one time.
10899806e231SRuslan ErmilovThe
10909deea857SKenneth D. Merry.Ar dev_openings
10919806e231SRuslan Ermilovvalue cannot go above this number.
10929806e231SRuslan ErmilovThe default value for
10939deea857SKenneth D. Merry.Ar maxtags
10949deea857SKenneth D. Merryis 255, although it may be set higher or lower for various devices.
10959deea857SKenneth D. Merry.El
10969deea857SKenneth D. Merry.El
109733fab22eSKenneth D. Merry.It Ic negotiate
10989806e231SRuslan ErmilovShow or negotiate various communication parameters.
10999806e231SRuslan ErmilovSome controllers may
11009806e231SRuslan Ermilovnot support setting or changing some of these values.
11019806e231SRuslan ErmilovFor instance, the
11029deea857SKenneth D. MerryAdaptec 174x controllers do not support changing a device's sync rate or
11039deea857SKenneth D. Merryoffset.
1104e1205e80SPhilippe CharnierThe
11057c7fb079SRuslan Ermilov.Nm
1106e1205e80SPhilippe Charnierutility
11079deea857SKenneth D. Merrywill not attempt to set the parameter if the controller indicates that it
11089806e231SRuslan Ermilovdoes not support setting the parameter.
11099806e231SRuslan ErmilovTo find out what the controller
11109deea857SKenneth D. Merrysupports, use the
11119deea857SKenneth D. Merry.Fl v
11129806e231SRuslan Ermilovflag.
11139806e231SRuslan ErmilovThe meaning of the
11149deea857SKenneth D. Merry.Fl v
11159deea857SKenneth D. Merryflag for the
111633fab22eSKenneth D. Merry.Ic negotiate
11179806e231SRuslan Ermilovcommand is described below.
11180227791bSRuslan ErmilovAlso, some controller drivers do not support
11199deea857SKenneth D. Merrysetting negotiation parameters, even if the underlying controller supports
11209806e231SRuslan Ermilovnegotiation changes.
11219806e231SRuslan ErmilovSome controllers, such as the Advansys wide
11229deea857SKenneth D. Merrycontrollers, support enabling and disabling synchronous negotiation for
11239deea857SKenneth D. Merrya device, but do not support setting the synchronous negotiation rate.
11241252c1bbSRuslan Ermilov.Bl -tag -width 17n
11259deea857SKenneth D. Merry.It Fl a
11269deea857SKenneth D. MerryAttempt to make the negotiation settings take effect immediately by sending
11279deea857SKenneth D. Merrya Test Unit Ready command to the device.
11289deea857SKenneth D. Merry.It Fl c
11299806e231SRuslan ErmilovShow or set current negotiation settings.
11309806e231SRuslan ErmilovThis is the default.
11319deea857SKenneth D. Merry.It Fl D Ar enable|disable
11329deea857SKenneth D. MerryEnable or disable disconnection.
1133b447e682SAlexander Motin.It Fl M Ar mode
1134b447e682SAlexander MotinSet ATA mode.
11359deea857SKenneth D. Merry.It Fl O Ar offset
11369deea857SKenneth D. MerrySet the command delay offset.
11379deea857SKenneth D. Merry.It Fl q
11380227791bSRuslan ErmilovBe quiet, do not print anything.
11399806e231SRuslan ErmilovThis is generally useful when you want to
11400227791bSRuslan Ermilovset a parameter, but do not want any status information.
11419deea857SKenneth D. Merry.It Fl R Ar syncrate
11429806e231SRuslan ErmilovChange the synchronization rate for a device.
11439806e231SRuslan ErmilovThe sync rate is a floating
11449806e231SRuslan Ermilovpoint value specified in MHz.
11459806e231SRuslan ErmilovSo, for instance,
11469deea857SKenneth D. Merry.Sq 20.000
11479deea857SKenneth D. Merryis a legal value, as is
11489deea857SKenneth D. Merry.Sq 20 .
11499deea857SKenneth D. Merry.It Fl T Ar enable|disable
11509deea857SKenneth D. MerryEnable or disable tagged queueing for a device.
11519deea857SKenneth D. Merry.It Fl U
11529806e231SRuslan ErmilovShow or set user negotiation settings.
11539806e231SRuslan ErmilovThe default is to show or set
11549deea857SKenneth D. Merrycurrent negotiation settings.
11559deea857SKenneth D. Merry.It Fl v
11569deea857SKenneth D. MerryThe verbose switch has special meaning for the
115733fab22eSKenneth D. Merry.Ic negotiate
11589806e231SRuslan Ermilovsubcommand.
11599806e231SRuslan ErmilovIt causes
11607c7fb079SRuslan Ermilov.Nm
11619deea857SKenneth D. Merryto print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the
11629deea857SKenneth D. Merrycontroller driver.
11639deea857SKenneth D. Merry.It Fl W Ar bus_width
11649806e231SRuslan ErmilovSpecify the bus width to negotiate with a device.
11659806e231SRuslan ErmilovThe bus width is
11669806e231SRuslan Ermilovspecified in bits.
11679806e231SRuslan ErmilovThe only useful values to specify are 8, 16, and 32
11689806e231SRuslan Ermilovbits.
11699806e231SRuslan ErmilovThe controller must support the bus width in question in order for
11709deea857SKenneth D. Merrythe setting to take effect.
11719deea857SKenneth D. Merry.El
11729deea857SKenneth D. Merry.Pp
11739deea857SKenneth D. MerryIn general, sync rate and offset settings will not take effect for a
11749806e231SRuslan Ermilovdevice until a command has been sent to the device.
11759806e231SRuslan ErmilovThe
11769deea857SKenneth D. Merry.Fl a
11779deea857SKenneth D. Merryswitch above will automatically send a Test Unit Ready to the device so
11789deea857SKenneth D. Merrynegotiation parameters will take effect.
117933fab22eSKenneth D. Merry.It Ic format
118096a93c63SKenneth D. MerryIssue the
118196a93c63SKenneth D. Merry.Tn SCSI
118296a93c63SKenneth D. MerryFORMAT UNIT command to the named device.
118396a93c63SKenneth D. Merry.Pp
118496a93c63SKenneth D. Merry.Em WARNING! WARNING! WARNING!
118596a93c63SKenneth D. Merry.Pp
11869806e231SRuslan ErmilovLow level formatting a disk will destroy ALL data on the disk.
11879806e231SRuslan ErmilovUse
11889806e231SRuslan Ermilovextreme caution when issuing this command.
11899806e231SRuslan ErmilovMany users low-level format
11909806e231SRuslan Ermilovdisks that do not really need to be low-level formatted.
11919806e231SRuslan ErmilovThere are
119296a93c63SKenneth D. Merryrelatively few scenarios that call for low-level formatting a disk.
119396a93c63SKenneth D. MerryOne reason for
119496a93c63SKenneth D. Merrylow-level formatting a disk is to initialize the disk after changing
11959806e231SRuslan Ermilovits physical sector size.
11969806e231SRuslan ErmilovAnother reason for low-level formatting a disk
119796a93c63SKenneth D. Merryis to revive the disk if you are getting "medium format corrupted" errors
119896a93c63SKenneth D. Merryfrom the disk in response to read and write requests.
119996a93c63SKenneth D. Merry.Pp
12009806e231SRuslan ErmilovSome disks take longer than others to format.
12019806e231SRuslan ErmilovUsers should specify a
12029806e231SRuslan Ermilovtimeout long enough to allow the format to complete.
12039806e231SRuslan ErmilovThe default format
12049806e231SRuslan Ermilovtimeout is 3 hours, which should be long enough for most disks.
12059806e231SRuslan ErmilovSome hard
120696a93c63SKenneth D. Merrydisks will complete a format operation in a very short period of time
12079806e231SRuslan Ermilov(on the order of 5 minutes or less).
12089806e231SRuslan ErmilovThis is often because the drive
12090227791bSRuslan Ermilovdoes not really support the FORMAT UNIT command -- it just accepts the
121096a93c63SKenneth D. Merrycommand, waits a few minutes and then returns it.
121196a93c63SKenneth D. Merry.Pp
121296a93c63SKenneth D. MerryThe
121396a93c63SKenneth D. Merry.Sq format
12149806e231SRuslan Ermilovsubcommand takes several arguments that modify its default behavior.
12159806e231SRuslan ErmilovThe
121696a93c63SKenneth D. Merry.Fl q
121796a93c63SKenneth D. Merryand
121896a93c63SKenneth D. Merry.Fl y
121996a93c63SKenneth D. Merryarguments can be useful for scripts.
12201252c1bbSRuslan Ermilov.Bl -tag -width 6n
122196a93c63SKenneth D. Merry.It Fl q
12220227791bSRuslan ErmilovBe quiet, do not print any status messages.
12239806e231SRuslan ErmilovThis option will not disable
12249806e231SRuslan Ermilovthe questions, however.
12259806e231SRuslan ErmilovTo disable questions, use the
122696a93c63SKenneth D. Merry.Fl y
122796a93c63SKenneth D. Merryargument, below.
1228e9e4d3e4SKenneth D. Merry.It Fl r
1229e9e4d3e4SKenneth D. MerryRun in
1230e9e4d3e4SKenneth D. Merry.Dq report only
1231e9e4d3e4SKenneth D. Merrymode.
1232e9e4d3e4SKenneth D. MerryThis will report status on a format that is already running on the drive.
123396a93c63SKenneth D. Merry.It Fl w
12349806e231SRuslan ErmilovIssue a non-immediate format command.
12359806e231SRuslan ErmilovBy default,
12367c7fb079SRuslan Ermilov.Nm
12379806e231SRuslan Ermilovissues the FORMAT UNIT command with the immediate bit set.
12389806e231SRuslan ErmilovThis tells the
123996a93c63SKenneth D. Merrydevice to immediately return the format command, before the format has
12409806e231SRuslan Ermilovactually completed.
12419806e231SRuslan ErmilovThen,
12427c7fb079SRuslan Ermilov.Nm
124396a93c63SKenneth D. Merrygathers
124496a93c63SKenneth D. Merry.Tn SCSI
124596a93c63SKenneth D. Merrysense information from the device every second to determine how far along
12469806e231SRuslan Ermilovin the format process it is.
12479806e231SRuslan ErmilovIf the
124896a93c63SKenneth D. Merry.Fl w
124996a93c63SKenneth D. Merryargument is specified,
12507c7fb079SRuslan Ermilov.Nm
125196a93c63SKenneth D. Merrywill issue a non-immediate format command, and will be unable to print any
125296a93c63SKenneth D. Merryinformation to let the user know what percentage of the disk has been
125396a93c63SKenneth D. Merryformatted.
125496a93c63SKenneth D. Merry.It Fl y
12550227791bSRuslan ErmilovDo not ask any questions.
12569806e231SRuslan ErmilovBy default,
12577c7fb079SRuslan Ermilov.Nm
125896a93c63SKenneth D. Merrywill ask the user if he/she really wants to format the disk in question,
12599806e231SRuslan Ermilovand also if the default format command timeout is acceptable.
12609806e231SRuslan ErmilovThe user
126196a93c63SKenneth D. Merrywill not be asked about the timeout if a timeout is specified on the
126296a93c63SKenneth D. Merrycommand line.
126396a93c63SKenneth D. Merry.El
1264ffead710SBryan Venteicher.It Ic sanitize
1265ffead710SBryan VenteicherIssue the
1266ffead710SBryan Venteicher.Tn SCSI
1267ffead710SBryan VenteicherSANITIZE command to the named device.
1268ffead710SBryan Venteicher.Pp
1269ffead710SBryan Venteicher.Em WARNING! WARNING! WARNING!
1270ffead710SBryan Venteicher.Pp
1271ffead710SBryan VenteicherALL data in the cache and on the disk will be destroyed or made inaccessible.
1272ffead710SBryan VenteicherRecovery of the data is not possible.
1273ffead710SBryan VenteicherUse extreme caution when issuing this command.
1274ffead710SBryan Venteicher.Pp
1275ffead710SBryan VenteicherThe
1276ffead710SBryan Venteicher.Sq sanitize
1277ffead710SBryan Venteichersubcommand takes several arguments that modify its default behavior.
1278ffead710SBryan VenteicherThe
1279ffead710SBryan Venteicher.Fl q
1280ffead710SBryan Venteicherand
1281ffead710SBryan Venteicher.Fl y
1282ffead710SBryan Venteicherarguments can be useful for scripts.
1283ffead710SBryan Venteicher.Bl -tag -width 6n
1284ffead710SBryan Venteicher.It Fl a Ar operation
1285ffead710SBryan VenteicherSpecify the sanitize operation to perform.
1286ffead710SBryan Venteicher.Bl -tag -width 16n
1287ffead710SBryan Venteicher.It overwrite
1288ffead710SBryan VenteicherPerform an overwrite operation by writing a user supplied
1289ffead710SBryan Venteicherdata pattern to the device one or more times.
1290ffead710SBryan VenteicherThe pattern is given by the
1291ffead710SBryan Venteicher.Fl P
1292ffead710SBryan Venteicherargument.
1293ffead710SBryan VenteicherThe number of times is given by the
1294ffead710SBryan Venteicher.Fl c
1295ffead710SBryan Venteicherargument.
1296ffead710SBryan Venteicher.It block
1297ffead710SBryan VenteicherPerform a block erase operation.
1298ffead710SBryan VenteicherAll the device's blocks are set to a vendor defined
1299ffead710SBryan Venteichervalue, typically zero.
1300ffead710SBryan Venteicher.It crypto
1301ffead710SBryan VenteicherPerform a cryptographic erase operation.
1302ffead710SBryan VenteicherThe encryption keys are changed to prevent the decryption
1303ffead710SBryan Venteicherof the data.
1304ffead710SBryan Venteicher.It exitfailure
1305ffead710SBryan VenteicherExits a previously failed sanitize operation.
1306ffead710SBryan VenteicherA failed sanitize operation can only be exited if it was
1307ffead710SBryan Venteicherrun in the unrestricted completion mode, as provided by the
1308ffead710SBryan Venteicher.Fl U
1309ffead710SBryan Venteicherargument.
1310ffead710SBryan Venteicher.El
1311ffead710SBryan Venteicher.It Fl c Ar passes
1312ffead710SBryan VenteicherThe number of passes when performing an
1313ffead710SBryan Venteicher.Sq overwrite
1314ffead710SBryan Venteicheroperation.
13155bb17266SJoel DahlValid values are between 1 and 31.
13165bb17266SJoel DahlThe default is 1.
1317ffead710SBryan Venteicher.It Fl I
1318ffead710SBryan VenteicherWhen performing an
1319ffead710SBryan Venteicher.Sq overwrite
1320ffead710SBryan Venteicheroperation, the pattern is inverted between consecutive passes.
1321ffead710SBryan Venteicher.It Fl P Ar pattern
1322ffead710SBryan VenteicherPath to the file containing the pattern to use when
1323ffead710SBryan Venteicherperforming an
1324ffead710SBryan Venteicher.Sq overwrite
1325ffead710SBryan Venteicheroperation.
1326ffead710SBryan VenteicherThe pattern is repeated as needed to fill each block.
1327ffead710SBryan Venteicher.It Fl q
1328ffead710SBryan VenteicherBe quiet, do not print any status messages.
1329ffead710SBryan VenteicherThis option will not disable
1330ffead710SBryan Venteicherthe questions, however.
1331ffead710SBryan VenteicherTo disable questions, use the
1332ffead710SBryan Venteicher.Fl y
1333ffead710SBryan Venteicherargument, below.
1334ffead710SBryan Venteicher.It Fl U
1335ffead710SBryan VenteicherPerform the sanitize in the unrestricted completion mode.
1336ffead710SBryan VenteicherIf the operation fails, it can later be exited with the
1337ffead710SBryan Venteicher.Sq exitfailure
1338ffead710SBryan Venteicheroperation.
1339ffead710SBryan Venteicher.It Fl r
1340ffead710SBryan VenteicherRun in
1341ffead710SBryan Venteicher.Dq report only
1342ffead710SBryan Venteichermode.
1343ffead710SBryan VenteicherThis will report status on a sanitize that is already running on the drive.
1344ffead710SBryan Venteicher.It Fl w
1345ffead710SBryan VenteicherIssue a non-immediate sanitize command.
1346ffead710SBryan VenteicherBy default,
1347ffead710SBryan Venteicher.Nm
1348ffead710SBryan Venteicherissues the SANITIZE command with the immediate bit set.
1349ffead710SBryan VenteicherThis tells the
1350ffead710SBryan Venteicherdevice to immediately return the sanitize command, before
1351ffead710SBryan Venteicherthe sanitize has actually completed.
1352ffead710SBryan VenteicherThen,
1353ffead710SBryan Venteicher.Nm
1354ffead710SBryan Venteichergathers
1355ffead710SBryan Venteicher.Tn SCSI
1356ffead710SBryan Venteichersense information from the device every second to determine how far along
1357ffead710SBryan Venteicherin the sanitize process it is.
1358ffead710SBryan VenteicherIf the
1359ffead710SBryan Venteicher.Fl w
1360ffead710SBryan Venteicherargument is specified,
1361ffead710SBryan Venteicher.Nm
1362ffead710SBryan Venteicherwill issue a non-immediate sanitize command, and will be unable to print any
1363ffead710SBryan Venteicherinformation to let the user know what percentage of the disk has been
1364ffead710SBryan Venteichersanitized.
1365ffead710SBryan Venteicher.It Fl y
1366ffead710SBryan VenteicherDo not ask any questions.
1367ffead710SBryan VenteicherBy default,
1368ffead710SBryan Venteicher.Nm
1369ffead710SBryan Venteicherwill ask the user if he/she really wants to sanitize the disk in question,
1370ffead710SBryan Venteicherand also if the default sanitize command timeout is acceptable.
1371ffead710SBryan VenteicherThe user
1372ffead710SBryan Venteicherwill not be asked about the timeout if a timeout is specified on the
1373ffead710SBryan Venteichercommand line.
1374ffead710SBryan Venteicher.El
137550c9a276SAlexander Motin.It Ic idle
13765bb17266SJoel DahlPut ATA device into IDLE state.
13775bb17266SJoel DahlOptional parameter
137872166fbaSAlexander Motin.Pq Fl t
13795bb17266SJoel Dahlspecifies automatic standby timer value in seconds.
13805bb17266SJoel DahlValue 0 disables timer.
138150c9a276SAlexander Motin.It Ic standby
13825bb17266SJoel DahlPut ATA device into STANDBY state.
13835bb17266SJoel DahlOptional parameter
138472166fbaSAlexander Motin.Pq Fl t
13855bb17266SJoel Dahlspecifies automatic standby timer value in seconds.
13865bb17266SJoel DahlValue 0 disables timer.
138750c9a276SAlexander Motin.It Ic sleep
13885bb17266SJoel DahlPut ATA device into SLEEP state.
13895bb17266SJoel DahlNote that the only way get device out of
139050c9a276SAlexander Motinthis state may be reset.
1391e7affda5SAlexander Motin.It Ic apm
1392e7affda5SAlexander MotinIt optional parameter
1393e7affda5SAlexander Motin.Pq Fl l
1394e7affda5SAlexander Motinspecified, enables and sets advanced power management level, where
1395e7affda5SAlexander Motin1 -- minimum power, 127 -- maximum performance with standby,
1396e7affda5SAlexander Motin128 -- minimum power without standby, 254 -- maximum performance.
1397e7affda5SAlexander MotinIf not specified -- APM is disabled.
1398e7affda5SAlexander Motin.It Ic aam
1399e7affda5SAlexander MotinIt optional parameter
1400e7affda5SAlexander Motin.Pq Fl l
1401e7affda5SAlexander Motinspecified, enables and sets automatic acoustic management level, where
1402e7affda5SAlexander Motin1 -- minimum noise, 254 -- maximum performance.
1403e7affda5SAlexander MotinIf not specified -- AAM is disabled.
14041146874aSSteven Hartland.It Ic security
14051146874aSSteven HartlandUpdate or report security settings, using an ATA identify command (0xec).
14061146874aSSteven HartlandBy default,
14071146874aSSteven Hartland.Nm
14081146874aSSteven Hartlandwill print out the security support and associated settings of the device.
14091146874aSSteven HartlandThe
14101146874aSSteven Hartland.Ic security
14111146874aSSteven Hartlandcommand takes several arguments:
14121146874aSSteven Hartland.Bl -tag -width 0n
14131146874aSSteven Hartland.It Fl d Ar pwd
14141146874aSSteven Hartland.Pp
14151146874aSSteven HartlandDisable device security using the given password for the selected user according
14161146874aSSteven Hartlandto the devices configured security level.
14171146874aSSteven Hartland.It Fl e Ar pwd
14181146874aSSteven Hartland.Pp
14191146874aSSteven HartlandErase the device using the given password for the selected user.
14201146874aSSteven Hartland.Pp
14211146874aSSteven Hartland.Em WARNING! WARNING! WARNING!
14221146874aSSteven Hartland.Pp
14231146874aSSteven HartlandIssuing a secure erase will
14241146874aSSteven Hartland.Em ERASE ALL
14251146874aSSteven Hartlanduser data on the device and may take several hours to complete.
14261146874aSSteven Hartland.Pp
14271146874aSSteven HartlandWhen this command is used against an SSD drive all its cells will be marked as
14285bb17266SJoel Dahlempty, restoring it to factory default write performance.
14295bb17266SJoel DahlFor SSD's this action
14301146874aSSteven Hartlandusually takes just a few seconds.
14311146874aSSteven Hartland.It Fl f
14321146874aSSteven Hartland.Pp
14331146874aSSteven HartlandFreeze the security configuration of the specified device.
14341146874aSSteven Hartland.Pp
14351146874aSSteven HartlandAfter command completion any other commands that update the device lock mode
1436e36a4a7eSJoel Dahlshall be command aborted.
1437e36a4a7eSJoel DahlFrozen mode is disabled by power-off or hardware reset.
14381146874aSSteven Hartland.It Fl h Ar pwd
14391146874aSSteven Hartland.Pp
14401146874aSSteven HartlandEnhanced erase the device using the given password for the selected user.
14411146874aSSteven Hartland.Pp
14421146874aSSteven Hartland.Em WARNING! WARNING! WARNING!
14431146874aSSteven Hartland.Pp
14441146874aSSteven HartlandIssuing an enhanced secure erase will
14451146874aSSteven Hartland.Em ERASE ALL
14461146874aSSteven Hartlanduser data on the device and may take several hours to complete.
14471146874aSSteven Hartland.Pp
14481146874aSSteven HartlandAn enhanced erase writes predetermined data patterns to all user data areas,
14491146874aSSteven Hartlandall previously written user data shall be overwritten, including sectors that
14501146874aSSteven Hartlandare no longer in use due to reallocation.
14511146874aSSteven Hartland.It Fl k Ar pwd
14521146874aSSteven Hartland.Pp
14531146874aSSteven HartlandUnlock the device using the given password for the selected user according to
14541146874aSSteven Hartlandthe devices configured security level.
14551146874aSSteven Hartland.It Fl l Ar high|maximum
14561146874aSSteven Hartland.Pp
14571146874aSSteven HartlandSpecifies which security level to set when issuing a
14581146874aSSteven Hartland.Fl s Ar pwd
14595bb17266SJoel Dahlcommand.
14605bb17266SJoel DahlThe security level determines device behavior when the master
14615bb17266SJoel Dahlpassword is used to unlock the device.
14625bb17266SJoel DahlWhen the security level is set to high
14631146874aSSteven Hartlandthe device requires the unlock command and the master password to unlock.
14641146874aSSteven HartlandWhen the security level is set to maximum the device requires a secure erase
14651146874aSSteven Hartlandwith the master password to unlock.
14661146874aSSteven Hartland.Pp
14671146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands.
14681146874aSSteven Hartland.Pp
14691146874aSSteven HartlandDefaults to
14701146874aSSteven Hartland.Em high
14711146874aSSteven Hartland.It Fl q
14721146874aSSteven Hartland.Pp
14731146874aSSteven HartlandBe quiet, do not print any status messages.
14741146874aSSteven HartlandThis option will not disable the questions, however.
14751146874aSSteven HartlandTo disable questions, use the
14761146874aSSteven Hartland.Fl y
14771146874aSSteven Hartlandargument, below.
14781146874aSSteven Hartland.It Fl s Ar pwd
14791146874aSSteven Hartland.Pp
14801146874aSSteven HartlandPassword the device (enable security) using the given password for the selected
14815bb17266SJoel Dahluser.
14825bb17266SJoel DahlThis option can be combined with other options such as
14831146874aSSteven Hartland.Fl e Em pwd
14841146874aSSteven Hartland.Pp
14851146874aSSteven HartlandA master password may be set in a addition to the user password. The purpose of
14861146874aSSteven Hartlandthe master password is to allow an administrator to establish a password that
14871146874aSSteven Hartlandis kept secret from the user, and which may be used to unlock the device if the
14881146874aSSteven Hartlanduser password is lost.
14891146874aSSteven Hartland.Pp
14901146874aSSteven Hartland.Em Note:
14911146874aSSteven HartlandSetting the master password does not enable device security.
14921146874aSSteven Hartland.Pp
14931146874aSSteven HartlandIf the master password is set and the drive supports a Master Revision Code
14941146874aSSteven Hartlandfeature the Master Password Revision Code will be decremented.
14951146874aSSteven Hartland.It Fl T Ar timeout
14961146874aSSteven Hartland.Pp
14971146874aSSteven HartlandOverrides the default timeout, specified in seconds, used for both
14981146874aSSteven Hartland.Fl e
14991146874aSSteven Hartlandand
15001146874aSSteven Hartland.Fl h
15011146874aSSteven Hartlandthis is useful if your system has problems processing long timeouts correctly.
15021146874aSSteven Hartland.Pp
15031146874aSSteven HartlandUsually the timeout is calculated from the information stored on the drive if
15041146874aSSteven Hartlandpresent, otherwise it defaults to 2 hours.
15051146874aSSteven Hartland.It Fl U Ar user|master
15061146874aSSteven Hartland.Pp
15071146874aSSteven HartlandSpecifies which user to set / use for the running action command, valid values
15081146874aSSteven Hartlandare user or master and defaults to master if not set.
15091146874aSSteven Hartland.Pp
15101146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands.
15111146874aSSteven Hartland.Pp
15121146874aSSteven HartlandDefaults to
15131146874aSSteven Hartland.Em master
15141146874aSSteven Hartland.It Fl y
15151146874aSSteven Hartland.Pp
15161146874aSSteven HartlandConfirm yes to dangerous options such as
15171146874aSSteven Hartland.Fl e
15181146874aSSteven Hartlandwithout prompting for confirmation.
15191146874aSSteven Hartland.El
1520f636caf1SJoel Dahl.Pp
15215bb17266SJoel DahlIf the password specified for any action commands does not match the configured
15221146874aSSteven Hartlandpassword for the specified user the command will fail.
15231146874aSSteven Hartland.Pp
15241146874aSSteven HartlandThe password in all cases is limited to 32 characters, longer passwords will
15251146874aSSteven Hartlandfail.
15269e68761cSSteven Hartland.It Ic hpa
15279e68761cSSteven HartlandUpdate or report Host Protected Area details.
15289e68761cSSteven HartlandBy default
15299e68761cSSteven Hartland.Nm
15309e68761cSSteven Hartlandwill print out the HPA support and associated settings of the device.
15319e68761cSSteven HartlandThe
15329e68761cSSteven Hartland.Ic hpa
15339e68761cSSteven Hartlandcommand takes several optional arguments:
15349e68761cSSteven Hartland.Bl -tag -width 0n
15359e68761cSSteven Hartland.It Fl f
15369e68761cSSteven Hartland.Pp
15379e68761cSSteven HartlandFreeze the HPA configuration of the specified device.
15389e68761cSSteven Hartland.Pp
15399e68761cSSteven HartlandAfter command completion any other commands that update the HPA configuration
15409e68761cSSteven Hartlandshall be command aborted.
15419e68761cSSteven HartlandFrozen mode is disabled by power-off or hardware reset.
15429e68761cSSteven Hartland.It Fl l
15439e68761cSSteven Hartland.Pp
15449e68761cSSteven HartlandLock the HPA configuration of the device until a successful call to unlock or
15459e68761cSSteven Hartlandthe next power-on reset occurs.
15469e68761cSSteven Hartland.It Fl P
15479e68761cSSteven Hartland.Pp
15489e68761cSSteven HartlandMake the HPA max sectors persist across power-on reset or a hardware reset.
15499e68761cSSteven HartlandThis must be used in combination with
15509e68761cSSteven Hartland.Fl s Ar max_sectors
15519e68761cSSteven Hartland.
15529e68761cSSteven Hartland.It Fl p Ar pwd
15539e68761cSSteven Hartland.Pp
15549e68761cSSteven HartlandSet the HPA configuration password required for unlock calls.
15559e68761cSSteven Hartland.It Fl q
15569e68761cSSteven Hartland.Pp
15579e68761cSSteven HartlandBe quiet, do not print any status messages.
15589e68761cSSteven HartlandThis option will not disable the questions.
15599e68761cSSteven HartlandTo disable questions, use the
15609e68761cSSteven Hartland.Fl y
15619e68761cSSteven Hartlandargument, below.
15629e68761cSSteven Hartland.It Fl s Ar max_sectors
15639e68761cSSteven Hartland.Pp
15649e68761cSSteven HartlandConfigures the maximum user accessible sectors of the device.
15659e68761cSSteven HartlandThis will change the number of sectors the device reports.
15669e68761cSSteven Hartland.Pp
15679e68761cSSteven Hartland.Em WARNING! WARNING! WARNING!
15689e68761cSSteven Hartland.Pp
15699e68761cSSteven HartlandChanging the max sectors of a device using this option will make the data on
15709e68761cSSteven Hartlandthe device beyond the specified value inaccessible.
15719e68761cSSteven Hartland.Pp
15729e68761cSSteven HartlandOnly one successful
15739e68761cSSteven Hartland.Fl s Ar max_sectors
15749e68761cSSteven Hartlandcall can be made without a power-on reset or a hardware reset of the device.
15759e68761cSSteven Hartland.It Fl U Ar pwd
15769e68761cSSteven Hartland.Pp
15779e68761cSSteven HartlandUnlock the HPA configuration of the specified device using the given password.
15785bb17266SJoel DahlIf the password specified does not match the password configured via
15799e68761cSSteven Hartland.Fl p Ar pwd
15809e68761cSSteven Hartlandthe command will fail.
15819e68761cSSteven Hartland.Pp
15829e68761cSSteven HartlandAfter 5 failed unlock calls, due to password miss-match, the device will refuse
15839e68761cSSteven Hartlandadditional unlock calls until after a power-on reset.
15849e68761cSSteven Hartland.It Fl y
15859e68761cSSteven Hartland.Pp
15869e68761cSSteven HartlandConfirm yes to dangerous options such as
15879e68761cSSteven Hartland.Fl e
15889e68761cSSteven Hartlandwithout prompting for confirmation
15899e68761cSSteven Hartland.El
1590f636caf1SJoel Dahl.Pp
15919e68761cSSteven HartlandThe password for all HPA commands is limited to 32 characters, longer passwords
15929e68761cSSteven Hartlandwill fail.
15931f4782a4SEd Maste.It Ic fwdownload
15940e358df0SKenneth D. MerryProgram firmware of the named
15950e358df0SKenneth D. Merry.Tn SCSI
15960e358df0SKenneth D. Merryor ATA device using the image file provided.
15971f4782a4SEd Maste.Pp
15980e358df0SKenneth D. MerryIf the device is a
15990e358df0SKenneth D. Merry.Tn SCSI
16000e358df0SKenneth D. Merrydevice and it provides a recommended timeout for the WRITE BUFFER command
16010e358df0SKenneth D. Merry(see the
16020e358df0SKenneth D. Merry.Nm
16030e358df0SKenneth D. Merryopcodes subcommand), that timeout will be used for the firmware download.
16040e358df0SKenneth D. MerryThe drive-recommended timeout value may be overridden on the command line
16050e358df0SKenneth D. Merrywith the
16060e358df0SKenneth D. Merry.Fl t
16070e358df0SKenneth D. Merryoption.
16080e358df0SKenneth D. Merry.Pp
16090e358df0SKenneth D. MerryCurrent list of supported vendors for SCSI/SAS drives:
16100e358df0SKenneth D. Merry.Bl -tag -width 10n
16110e358df0SKenneth D. Merry.It HGST
16120e358df0SKenneth D. MerryTested with 4TB SAS drives, model number HUS724040ALS640.
16130e358df0SKenneth D. Merry.It HITACHI
16140e358df0SKenneth D. Merry.It HP
16150e358df0SKenneth D. Merry.It IBM
16160e358df0SKenneth D. MerryTested with LTO-5 (ULTRIUM-HH5) and LTO-6 (ULTRIUM-HH6) tape drives.
16170e358df0SKenneth D. MerryThere is a separate table entry for hard drives, because the update method
16180e358df0SKenneth D. Merryfor hard drives is different than the method for tape drives.
16190e358df0SKenneth D. Merry.It PLEXTOR
16200e358df0SKenneth D. Merry.It QUALSTAR
16210e358df0SKenneth D. Merry.It QUANTUM
16220e358df0SKenneth D. Merry.It SAMSUNG
16230e358df0SKenneth D. MerryTested with SM1625 SSDs.
16240e358df0SKenneth D. Merry.It SEAGATE
16250e358df0SKenneth D. MerryTested with Constellation ES (ST32000444SS), ES.2 (ST33000651SS) and
16260e358df0SKenneth D. MerryES.3 (ST1000NM0023) drives.
16270e358df0SKenneth D. Merry.It SmrtStor
16280e358df0SKenneth D. MerryTested with 400GB Optimus SSDs (TXA2D20400GA6001).
16291f4782a4SEd Maste.El
16301f4782a4SEd Maste.Pp
16311f4782a4SEd Maste.Em WARNING! WARNING! WARNING!
16321f4782a4SEd Maste.Pp
16331f4782a4SEd MasteLittle testing has been done to make sure that different device models from
16341f4782a4SEd Masteeach vendor work correctly with the fwdownload command.
16351f4782a4SEd MasteA vendor name appearing in the supported list means only that firmware of at
16361f4782a4SEd Masteleast one device type from that vendor has successfully been programmed with
16371f4782a4SEd Mastethe fwdownload command.
16381f4782a4SEd MasteExtra caution should be taken when using this command since there is no
16391f4782a4SEd Masteguarantee it will not break a device from the listed vendors.
16401f4782a4SEd MasteEnsure that you have a recent backup of the data on the device before
16411f4782a4SEd Masteperforming a firmware update.
16420e358df0SKenneth D. Merry.Pp
16430e358df0SKenneth D. MerryNote that unknown
16440e358df0SKenneth D. Merry.Tn SCSI
16450e358df0SKenneth D. Merryprotocol devices will not be programmed, since there is little chance of
16460e358df0SKenneth D. Merrythe firmware download succeeding.
16470e358df0SKenneth D. Merry.Pp
16480e358df0SKenneth D. Merry.Nm
16490e358df0SKenneth D. Merrywill currently attempt a firmware download to any
16500e358df0SKenneth D. Merry.Tn ATA
16510e358df0SKenneth D. Merryor
16520e358df0SKenneth D. Merry.Tn SATA
16530e358df0SKenneth D. Merrydevice, since the standard
16540e358df0SKenneth D. Merry.Tn ATA
16550e358df0SKenneth D. MerryDOWNLOAD MICROCODE command may work.
16560e358df0SKenneth D. MerryFirmware downloads to
16570e358df0SKenneth D. Merry.Tn ATA
16580e358df0SKenneth D. Merryand
16590e358df0SKenneth D. Merry.Tn SATA
16600e358df0SKenneth D. Merrydevices are supported for devices connected
16610e358df0SKenneth D. Merryto standard
16620e358df0SKenneth D. Merry.Tn ATA
16630e358df0SKenneth D. Merryand
16640e358df0SKenneth D. Merry.Tn SATA
16650e358df0SKenneth D. Merrycontrollers, and devices connected to SAS controllers
16660e358df0SKenneth D. Merrywith
16670e358df0SKenneth D. Merry.Tn SCSI
16680e358df0SKenneth D. Merryto
16690e358df0SKenneth D. Merry.Tn ATA
16700e358df0SKenneth D. Merrytranslation capability.
16710e358df0SKenneth D. MerryIn the latter case,
16720e358df0SKenneth D. Merry.Nm
16730e358df0SKenneth D. Merryuses the
16740e358df0SKenneth D. Merry.Tn SCSI
16750e358df0SKenneth D. Merry.Tn ATA
16760e358df0SKenneth D. MerryPASS-THROUGH command to send the
16770e358df0SKenneth D. Merry.Tn ATA
16780e358df0SKenneth D. MerryDOWNLOAD MICROCODE command to the drive.
16790e358df0SKenneth D. MerrySome
16800e358df0SKenneth D. Merry.Tn SCSI
16810e358df0SKenneth D. Merryto
16820e358df0SKenneth D. Merry.Tn ATA
16830e358df0SKenneth D. Merrytranslation implementations don't work fully when translating
16840e358df0SKenneth D. Merry.Tn SCSI
16850e358df0SKenneth D. MerryWRITE BUFFER commands to
16860e358df0SKenneth D. Merry.Tn ATA
16870e358df0SKenneth D. MerryDOWNLOAD MICROCODE commands, but do support
16880e358df0SKenneth D. Merry.Tn ATA
16890e358df0SKenneth D. Merrypassthrough well enough to do a firmware download.
16901f4782a4SEd Maste.Bl -tag -width 11n
16911f4782a4SEd Maste.It Fl f Ar fw_image
16921f4782a4SEd MastePath to the firmware image file to be downloaded to the specified device.
16930e358df0SKenneth D. Merry.It Fl q
16940e358df0SKenneth D. MerryDo not print informational messages, only print errors.
16950e358df0SKenneth D. MerryThis option should be used with the
16960e358df0SKenneth D. Merry.Fl y
16970e358df0SKenneth D. Merryoption to suppress all output.
16981f4782a4SEd Maste.It Fl s
16991f4782a4SEd MasteRun in simulation mode.
17000e358df0SKenneth D. MerryDevice checks are run and the confirmation dialog is shown, but no firmware
17010e358df0SKenneth D. Merrydownload will occur.
17021f4782a4SEd Maste.It Fl v
17030e358df0SKenneth D. MerryShow
17040e358df0SKenneth D. Merry.Tn SCSI
17050e358df0SKenneth D. Merryor
17060e358df0SKenneth D. Merry.Tn ATA
17070e358df0SKenneth D. Merryerrors in the event of a failure.
17080e358df0SKenneth D. Merry.Pp
17090e358df0SKenneth D. MerryIn simulation mode, print out the
17100e358df0SKenneth D. Merry.Tn SCSI
17110e358df0SKenneth D. MerryCDB
17120e358df0SKenneth D. Merryor
17130e358df0SKenneth D. Merry.Tn ATA
17140e358df0SKenneth D. Merryregister values that would be used for the firmware download command.
17150e358df0SKenneth D. Merry.It Fl y
17160e358df0SKenneth D. MerryDo not ask for confirmation.
17171f4782a4SEd Maste.El
171808df2e3eSKenneth D. Merry.It Ic persist
171908df2e3eSKenneth D. MerryPersistent reservation support.
172008df2e3eSKenneth D. MerryPersistent reservations are a way to reserve a particular
172108df2e3eSKenneth D. Merry.Tn SCSI
172208df2e3eSKenneth D. MerryLUN for use by one or more
172308df2e3eSKenneth D. Merry.Tn SCSI
172408df2e3eSKenneth D. Merryinitiators.
172508df2e3eSKenneth D. MerryIf the
172608df2e3eSKenneth D. Merry.Fl i
172708df2e3eSKenneth D. Merryoption is specified,
172808df2e3eSKenneth D. Merry.Nm
172908df2e3eSKenneth D. Merrywill issue the
173008df2e3eSKenneth D. Merry.Tn SCSI
173108df2e3eSKenneth D. MerryPERSISTENT RESERVE IN
173208df2e3eSKenneth D. Merrycommand using the requested service action.
173308df2e3eSKenneth D. MerryIf the
173408df2e3eSKenneth D. Merry.Fl o
173508df2e3eSKenneth D. Merryoption is specified,
173608df2e3eSKenneth D. Merry.Nm
173708df2e3eSKenneth D. Merrywill issue the
173808df2e3eSKenneth D. Merry.Tn SCSI
173908df2e3eSKenneth D. MerryPERSISTENT RESERVE OUT
174008df2e3eSKenneth D. Merrycommand using the requested service action.
174108df2e3eSKenneth D. MerryOne of those two options is required.
174208df2e3eSKenneth D. Merry.Pp
174308df2e3eSKenneth D. MerryPersistent reservations are complex, and fully explaining them is outside
174408df2e3eSKenneth D. Merrythe scope of this manual.
174508df2e3eSKenneth D. MerryPlease visit
174608df2e3eSKenneth D. Merryhttp://www.t10.org
174708df2e3eSKenneth D. Merryand download the latest SPC spec for a full explanation of persistent
174808df2e3eSKenneth D. Merryreservations.
174908df2e3eSKenneth D. Merry.Bl -tag -width 8n
175008df2e3eSKenneth D. Merry.It Fl i Ar mode
175108df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE IN command.
175208df2e3eSKenneth D. MerrySupported service actions:
175308df2e3eSKenneth D. Merry.Bl -tag -width 19n
175408df2e3eSKenneth D. Merry.It read_keys
175508df2e3eSKenneth D. MerryReport the current persistent reservation generation (PRgeneration) and any
175608df2e3eSKenneth D. Merryregistered keys.
175708df2e3eSKenneth D. Merry.It read_reservation
175808df2e3eSKenneth D. MerryReport the persistent reservation, if any.
175908df2e3eSKenneth D. Merry.It report_capabilities
176008df2e3eSKenneth D. MerryReport the persistent reservation capabilities of the LUN.
176108df2e3eSKenneth D. Merry.It read_full_status
176208df2e3eSKenneth D. MerryReport the full status of persistent reservations on the LUN.
176308df2e3eSKenneth D. Merry.El
176408df2e3eSKenneth D. Merry.It Fl o Ar mode
176508df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE OUT command.
176608df2e3eSKenneth D. MerryFor service actions like register that are components of other service
176708df2e3eSKenneth D. Merryaction names, the entire name must be specified.
176808df2e3eSKenneth D. MerryOtherwise, enough of the service action name must be specified to
176908df2e3eSKenneth D. Merrydistinguish it from other possible service actions.
177008df2e3eSKenneth D. MerrySupported service actions:
177108df2e3eSKenneth D. Merry.Bl -tag -width 15n
177208df2e3eSKenneth D. Merry.It register
177308df2e3eSKenneth D. MerryRegister a reservation key with the LUN or unregister a reservation key.
177408df2e3eSKenneth D. MerryTo register a key, specify the requested key as the Service Action
177508df2e3eSKenneth D. MerryReservation Key.
177608df2e3eSKenneth D. MerryTo unregister a key, specify the previously registered key as the
177708df2e3eSKenneth D. MerryReservation Key.
177808df2e3eSKenneth D. MerryTo change a key, specify the old key as the Reservation Key and the new
177908df2e3eSKenneth D. Merrykey as the Service Action Reservation Key.
178008df2e3eSKenneth D. Merry.It register_ignore
178108df2e3eSKenneth D. MerryThis is similar to the register subcommand, except that the Reservation Key
178208df2e3eSKenneth D. Merryis ignored.
178308df2e3eSKenneth D. MerryThe Service Action Reservation Key will overwrite any previous key
178408df2e3eSKenneth D. Merryregistered for the initiator.
178508df2e3eSKenneth D. Merry.It reserve
178608df2e3eSKenneth D. MerryCreate a reservation.
178708df2e3eSKenneth D. MerryA key must be registered with the LUN before the LUN can be reserved, and
178808df2e3eSKenneth D. Merryit must be specified as the Reservation Key.
178908df2e3eSKenneth D. MerryThe type of reservation must also be specified.
179008df2e3eSKenneth D. MerryThe scope defaults to LUN scope (LU_SCOPE), but may be changed.
179108df2e3eSKenneth D. Merry.It release
179208df2e3eSKenneth D. MerryRelease a reservation.
179308df2e3eSKenneth D. MerryThe Reservation Key must be specified.
179408df2e3eSKenneth D. Merry.It clear
179508df2e3eSKenneth D. MerryRelease a reservation and remove all keys from the device.
179608df2e3eSKenneth D. MerryThe Reservation Key must be specified.
179708df2e3eSKenneth D. Merry.It preempt
179808df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator.
179908df2e3eSKenneth D. MerryThe Reservation Key must be specified.
180008df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the
180108df2e3eSKenneth D. Merryoperation being performed.
180208df2e3eSKenneth D. Merry.It preempt_abort
180308df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator and abort all
180408df2e3eSKenneth D. Merryoutstanding commands from that initiator.
180508df2e3eSKenneth D. MerryThe Reservation Key must be specified.
180608df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the
180708df2e3eSKenneth D. Merryoperation being performed.
180808df2e3eSKenneth D. Merry.It register_move
180908df2e3eSKenneth D. MerryRegister another initiator with the LUN, and establish a reservation on the
181008df2e3eSKenneth D. MerryLUN for that initiator.
181108df2e3eSKenneth D. MerryThe Reservation Key and Service Action Reservation Key must be specified.
181208df2e3eSKenneth D. Merry.It replace_lost
181308df2e3eSKenneth D. MerryReplace Lost Reservation information.
181408df2e3eSKenneth D. Merry.El
181508df2e3eSKenneth D. Merry.It Fl a
181608df2e3eSKenneth D. MerrySet the All Target Ports (ALL_TG_PT) bit.
181708df2e3eSKenneth D. MerryThis requests that the key registration be applied to all target ports and
181808df2e3eSKenneth D. Merrynot just the particular target port that receives the command.
181908df2e3eSKenneth D. MerryThis only applies to the register and register_ignore actions.
182008df2e3eSKenneth D. Merry.It Fl I Ar tid
182108df2e3eSKenneth D. MerrySpecify a Transport ID.
182208df2e3eSKenneth D. MerryThis only applies to the Register and Register and Move service actions for
182308df2e3eSKenneth D. MerryPersistent Reserve Out.
182408df2e3eSKenneth D. MerryMultiple Transport IDs may be specified with multiple
182508df2e3eSKenneth D. Merry.Fl I
182608df2e3eSKenneth D. Merryarguments.
182708df2e3eSKenneth D. MerryWith the Register service action, specifying one or more Transport IDs
182808df2e3eSKenneth D. Merryimplicitly enables the
182908df2e3eSKenneth D. Merry.Fl S
183008df2e3eSKenneth D. Merryoption which turns on the SPEC_I_PT bit.
183108df2e3eSKenneth D. MerryTransport IDs generally have the format protocol,id.
183208df2e3eSKenneth D. Merry.Bl -tag -width 5n
183308df2e3eSKenneth D. Merry.It SAS
183408df2e3eSKenneth D. MerryA SAS Transport ID consists of
183508df2e3eSKenneth D. Merry.Dq sas,
183608df2e3eSKenneth D. Merryfollowed by a 64-bit SAS address.
183708df2e3eSKenneth D. MerryFor example:
183808df2e3eSKenneth D. Merry.Pp
183908df2e3eSKenneth D. Merry.Dl sas,0x1234567812345678
184008df2e3eSKenneth D. Merry.It FC
184108df2e3eSKenneth D. MerryA Fibre Channel Transport ID consists of
184208df2e3eSKenneth D. Merry.Dq fcp,
184308df2e3eSKenneth D. Merryfollowed by a 64-bit Fibre Channel World Wide Name.
184408df2e3eSKenneth D. MerryFor example:
184508df2e3eSKenneth D. Merry.Pp
184608df2e3eSKenneth D. Merry.Dl fcp,0x1234567812345678
184708df2e3eSKenneth D. Merry.It SPI
184808df2e3eSKenneth D. MerryA Parallel SCSI address consists of
184908df2e3eSKenneth D. Merry.Dq spi,
185008df2e3eSKenneth D. Merryfollowed by a SCSI target ID and a relative target port identifier.
185108df2e3eSKenneth D. MerryFor example:
185208df2e3eSKenneth D. Merry.Pp
185308df2e3eSKenneth D. Merry.Dl spi,4,1
185408df2e3eSKenneth D. Merry.It 1394
185508df2e3eSKenneth D. MerryAn IEEE 1394 (Firewire) Transport ID consists of
185608df2e3eSKenneth D. Merry.Dq sbp,
185708df2e3eSKenneth D. Merryfollowed by a 64-bit EUI-64 IEEE 1394 node unique identifier.
185808df2e3eSKenneth D. MerryFor example:
185908df2e3eSKenneth D. Merry.Pp
186008df2e3eSKenneth D. Merry.Dl sbp,0x1234567812345678
186108df2e3eSKenneth D. Merry.It RDMA
186208df2e3eSKenneth D. MerryA SCSI over RDMA Transport ID consists of
186308df2e3eSKenneth D. Merry.Dq srp,
186408df2e3eSKenneth D. Merryfollowed by a 128-bit RDMA initiator port identifier.
186508df2e3eSKenneth D. MerryThe port identifier must be exactly 32 or 34 (if the leading 0x is
186608df2e3eSKenneth D. Merryincluded) hexadecimal digits.
186708df2e3eSKenneth D. MerryOnly hexadecimal (base 16) numbers are supported.
186808df2e3eSKenneth D. MerryFor example:
186908df2e3eSKenneth D. Merry.Pp
187008df2e3eSKenneth D. Merry.Dl srp,0x12345678123456781234567812345678
187108df2e3eSKenneth D. Merry.It iSCSI
187208df2e3eSKenneth D. MerryAn iSCSI Transport ID consists an iSCSI name and optionally a separator and
187308df2e3eSKenneth D. MerryiSCSI session ID.
187408df2e3eSKenneth D. MerryFor example, if only the iSCSI name is specified:
187508df2e3eSKenneth D. Merry.Pp
187608df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0
187708df2e3eSKenneth D. Merry.Pp
187808df2e3eSKenneth D. MerryIf the iSCSI separator and initiator session ID are specified:
187908df2e3eSKenneth D. Merry.Pp
188008df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0,i,0x123
188108df2e3eSKenneth D. Merry.It PCIe
188208df2e3eSKenneth D. MerryA SCSI over PCIe Transport ID consists of
188308df2e3eSKenneth D. Merry.Dq sop,
188408df2e3eSKenneth D. Merryfollowed by a PCIe Routing ID.
188508df2e3eSKenneth D. MerryThe Routing ID consists of a bus, device and function or in the alternate
188608df2e3eSKenneth D. Merryform, a bus and function.
188708df2e3eSKenneth D. MerryThe bus must be in the range of 0 to 255 inclusive and the device must be
188808df2e3eSKenneth D. Merryin the range of 0 to 31 inclusive.
188908df2e3eSKenneth D. MerryThe function must be in the range of 0 to 7 inclusive if the standard form
189008df2e3eSKenneth D. Merryis used, and in the range of 0 to 255 inclusive if the alternate form is
189108df2e3eSKenneth D. Merryused.
189208df2e3eSKenneth D. MerryFor example, if a bus, device and function are specified for the standard
189308df2e3eSKenneth D. MerryRouting ID form:
189408df2e3eSKenneth D. Merry.Pp
189508df2e3eSKenneth D. Merry.Dl sop,4,5,1
189608df2e3eSKenneth D. Merry.Pp
189708df2e3eSKenneth D. MerryIf the alternate Routing ID form is used:
189808df2e3eSKenneth D. Merry.Pp
189908df2e3eSKenneth D. Merry.Dl sop,4,1
190008df2e3eSKenneth D. Merry.El
190108df2e3eSKenneth D. Merry.It Fl k Ar key
190208df2e3eSKenneth D. MerrySpecify the Reservation Key.
190308df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format.
190408df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified.
190508df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive.
190608df2e3eSKenneth D. Merry.It Fl K Ar key
190708df2e3eSKenneth D. MerrySpecify the Service Action Reservation Key.
190808df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format.
190908df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified.
191008df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive.
191108df2e3eSKenneth D. Merry.It Fl p
191208df2e3eSKenneth D. MerryEnable the Activate Persist Through Power Loss bit.
191308df2e3eSKenneth D. MerryThis is only used for the register and register_ignore actions.
191408df2e3eSKenneth D. MerryThis requests that the reservation persist across power loss events.
191508df2e3eSKenneth D. Merry.It Fl s Ar scope
191608df2e3eSKenneth D. MerrySpecify the scope of the reservation.
191708df2e3eSKenneth D. MerryThe scope may be specified by name or by number.
191808df2e3eSKenneth D. MerryThe scope is ignored for register, register_ignore and clear.
191908df2e3eSKenneth D. MerryIf the desired scope isn't available by name, you may specify the number.
192008df2e3eSKenneth D. Merry.Bl -tag -width 7n
192108df2e3eSKenneth D. Merry.It lun
192208df2e3eSKenneth D. MerryLUN scope (0x00).
192308df2e3eSKenneth D. MerryThis encompasses the entire LUN.
192408df2e3eSKenneth D. Merry.It extent
192508df2e3eSKenneth D. MerryExtent scope (0x01).
192608df2e3eSKenneth D. Merry.It element
192708df2e3eSKenneth D. MerryElement scope (0x02).
192808df2e3eSKenneth D. Merry.El
192908df2e3eSKenneth D. Merry.It Fl R Ar rtp
193008df2e3eSKenneth D. MerrySpecify the Relative Target Port.
193108df2e3eSKenneth D. MerryThis only applies to the Register and Move service action of the Persistent
193208df2e3eSKenneth D. MerryReserve Out command.
193308df2e3eSKenneth D. Merry.It Fl S
193408df2e3eSKenneth D. MerryEnable the SPEC_I_PT bit.
193508df2e3eSKenneth D. MerryThis only applies to the Register service action of Persistent Reserve Out.
193608df2e3eSKenneth D. MerryYou must also specify at least one Transport ID with
193708df2e3eSKenneth D. Merry.Fl I
193808df2e3eSKenneth D. Merryif this option is set.
193908df2e3eSKenneth D. MerryIf you specify a Transport ID, this option is automatically set.
194008df2e3eSKenneth D. MerryIt is an error to specify this option for any service action other than
194108df2e3eSKenneth D. MerryRegister.
194208df2e3eSKenneth D. Merry.It Fl T Ar type
194308df2e3eSKenneth D. MerrySpecify the reservation type.
194408df2e3eSKenneth D. MerryThe reservation type may be specified by name or by number.
194508df2e3eSKenneth D. MerryIf the desired reservation type isn't available by name, you may specify
194608df2e3eSKenneth D. Merrythe number.
194708df2e3eSKenneth D. MerrySupported reservation type names:
194808df2e3eSKenneth D. Merry.Bl -tag -width 11n
194908df2e3eSKenneth D. Merry.It read_shared
195008df2e3eSKenneth D. MerryRead Shared mode.
195108df2e3eSKenneth D. Merry.It wr_ex
195208df2e3eSKenneth D. MerryWrite Exclusive mode.
195308df2e3eSKenneth D. MerryMay also be specified as
195408df2e3eSKenneth D. Merry.Dq write_exclusive .
195508df2e3eSKenneth D. Merry.It rd_ex
195608df2e3eSKenneth D. MerryRead Exclusive mode.
195708df2e3eSKenneth D. MerryMay also be specified as
195808df2e3eSKenneth D. Merry.Dq read_exclusive .
195908df2e3eSKenneth D. Merry.It ex_ac
196008df2e3eSKenneth D. MerryExclusive access mode.
196108df2e3eSKenneth D. MerryMay also be specified as
196208df2e3eSKenneth D. Merry.Dq exclusive_access .
196308df2e3eSKenneth D. Merry.It wr_ex_ro
196408df2e3eSKenneth D. MerryWrite Exclusive Registrants Only mode.
196508df2e3eSKenneth D. MerryMay also be specified as
196608df2e3eSKenneth D. Merry.Dq write_exclusive_reg_only .
196708df2e3eSKenneth D. Merry.It ex_ac_ro
196808df2e3eSKenneth D. MerryExclusive Access Registrants Only mode.
196908df2e3eSKenneth D. MerryMay also be specified as
197008df2e3eSKenneth D. Merry.Dq exclusive_access_reg_only .
197108df2e3eSKenneth D. Merry.It wr_ex_ar
197208df2e3eSKenneth D. MerryWrite Exclusive All Registrants mode.
197308df2e3eSKenneth D. MerryMay also be specified as
197408df2e3eSKenneth D. Merry.Dq write_exclusive_all_regs .
197508df2e3eSKenneth D. Merry.It ex_ac_ar
197608df2e3eSKenneth D. MerryExclusive Access All Registrants mode.
197708df2e3eSKenneth D. MerryMay also be specified as
197808df2e3eSKenneth D. Merry.Dq exclusive_access_all_regs .
197908df2e3eSKenneth D. Merry.El
198008df2e3eSKenneth D. Merry.It Fl U
198108df2e3eSKenneth D. MerrySpecify that the target should unregister the initiator that sent
198208df2e3eSKenneth D. Merrythe Register and Move request.
198308df2e3eSKenneth D. MerryBy default, the target will not unregister the initiator that sends the
198408df2e3eSKenneth D. MerryRegister and Move request.
198508df2e3eSKenneth D. MerryThis option only applies to the Register and Move service action of the
198608df2e3eSKenneth D. MerryPersistent Reserve Out command.
198708df2e3eSKenneth D. Merry.El
19885672fac9SKenneth D. Merry.It Ic attrib
19895672fac9SKenneth D. MerryIssue the
19905672fac9SKenneth D. Merry.Tn SCSI
19915672fac9SKenneth D. MerryREAD or WRITE ATTRIBUTE commands.
19925672fac9SKenneth D. MerryThese commands are used to read and write attributes in Medium Auxiliary
19935672fac9SKenneth D. MerryMemory (MAM).
19945672fac9SKenneth D. MerryThe most common place Medium Auxiliary Memory is found is small flash chips
19955672fac9SKenneth D. Merryincluded tape cartriges.
19965672fac9SKenneth D. MerryFor instance,
19975672fac9SKenneth D. Merry.Tn LTO
19985672fac9SKenneth D. Merrytapes have MAM.
19995672fac9SKenneth D. MerryEither the
20005672fac9SKenneth D. Merry.Fl r
20015672fac9SKenneth D. Merryoption or the
20025672fac9SKenneth D. Merry.Fl w
20035672fac9SKenneth D. Merryoption must be specified.
20045672fac9SKenneth D. Merry.Bl -tag -width 14n
20055672fac9SKenneth D. Merry.It Fl r Ar action
20065672fac9SKenneth D. MerrySpecify the READ ATTRIBUTE service action.
20075672fac9SKenneth D. Merry.Bl -tag -width 11n
20085672fac9SKenneth D. Merry.It attr_values
20095672fac9SKenneth D. MerryIssue the ATTRIBUTE VALUES service action.
20105672fac9SKenneth D. MerryRead and decode the available attributes and their values.
20115672fac9SKenneth D. Merry.It attr_list
20125672fac9SKenneth D. MerryIssue the ATTRIBUTE LIST service action.
20135672fac9SKenneth D. MerryList the attributes that are available to read and write.
20145672fac9SKenneth D. Merry.It lv_list
20155672fac9SKenneth D. MerryIssue the LOGICAL VOLUME LIST service action.
20165672fac9SKenneth D. MerryList the available logical volumes in the MAM.
20175672fac9SKenneth D. Merry.It part_list
20185672fac9SKenneth D. MerryIssue the PARTITION LIST service action.
20195672fac9SKenneth D. MerryList the available partitions in the MAM.
20205672fac9SKenneth D. Merry.It supp_attr
20215672fac9SKenneth D. MerryIssue the SUPPORTED ATTRIBUTES service action.
20225672fac9SKenneth D. MerryList attributes that are supported for reading or writing.
20235672fac9SKenneth D. MerryThese attributes may or may not be currently present in the MAM.
20245672fac9SKenneth D. Merry.El
20255672fac9SKenneth D. Merry.It Fl w Ar attr
20265672fac9SKenneth D. MerrySpecify an attribute to write to the MAM.
20275672fac9SKenneth D. MerryThis option is not yet implemented.
20285672fac9SKenneth D. Merry.It Fl a Ar num
20295672fac9SKenneth D. MerrySpecify the attribute number to display.
20305672fac9SKenneth D. MerryThis option only works with the attr_values, attr_list and supp_attr
20315672fac9SKenneth D. Merryarguments to
20325672fac9SKenneth D. Merry.Fl r .
20335672fac9SKenneth D. Merry.It Fl c
20345672fac9SKenneth D. MerryDisplay cached attributes.
20355672fac9SKenneth D. MerryIf the device supports this flag, it allows displaying attributes for the
20365672fac9SKenneth D. Merrylast piece of media loaded in the drive.
20375672fac9SKenneth D. Merry.It Fl e Ar num
20385672fac9SKenneth D. MerrySpecify the element address.
20395672fac9SKenneth D. MerryThis is used for specifying which element number in a medium changer to
20405672fac9SKenneth D. Merryaccess when reading attributes.
20415672fac9SKenneth D. MerryThe element number could be for a picker, portal, slot or drive.
20425672fac9SKenneth D. Merry.It Fl F Ar form1,form2
20435672fac9SKenneth D. MerrySpecify the output format for the attribute values (attr_val) display as a
20445672fac9SKenneth D. Merrycomma separated list of options.
20455672fac9SKenneth D. MerryThe default output is currently set to field_all,nonascii_trim,text_raw.
20465672fac9SKenneth D. MerryOnce this code is ported to FreeBSD 10, any text fields will be converted
20475672fac9SKenneth D. Merryfrom their codeset to the user's native codeset with
20485672fac9SKenneth D. Merry.Xr iconv 3 .
20495672fac9SKenneth D. Merry.Pp
20505672fac9SKenneth D. MerryThe text options are mutually exclusive; if you specify more than one, you
20515672fac9SKenneth D. Merrywill get unpredictable results.
20525672fac9SKenneth D. MerryThe nonascii options are also mutually exclusive.
20535672fac9SKenneth D. MerryMost of the field options may be logically ORed together.
20545672fac9SKenneth D. Merry.Bl -tag -width 12n
20555672fac9SKenneth D. Merry.It text_esc
20565672fac9SKenneth D. MerryPrint text fields with non-ASCII characters escaped.
20575672fac9SKenneth D. Merry.It text_raw
20585672fac9SKenneth D. MerryPrint text fields natively, with no codeset conversion.
20595672fac9SKenneth D. Merry.It nonascii_esc
20605672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII,
20615672fac9SKenneth D. Merryescape the non-ASCII characters.
20625672fac9SKenneth D. Merry.It nonascii_trim
20635672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII,
20645672fac9SKenneth D. Merryomit the non-ASCII characters.
20655672fac9SKenneth D. Merry.It nonascii_raw
20665672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII,
20675672fac9SKenneth D. Merryprint them as they are.
20685672fac9SKenneth D. Merry.It field_all
20695672fac9SKenneth D. MerryPrint all of the prefix fields: description, attribute number, attribute
20705672fac9SKenneth D. Merrysize, and the attribute's readonly status.
20715672fac9SKenneth D. MerryIf field_all is specified, specifying any other field options will not have
20725672fac9SKenneth D. Merryan effect.
20735672fac9SKenneth D. Merry.It field_none
20745672fac9SKenneth D. MerryPrint none of the prefix fields, and only print out the attribute value.
20755672fac9SKenneth D. MerryIf field_none is specified, specifying any other field options will result
20765672fac9SKenneth D. Merryin those fields being printed.
20775672fac9SKenneth D. Merry.It field_desc
20785672fac9SKenneth D. MerryPrint out the attribute description.
20795672fac9SKenneth D. Merry.It field_num
20805672fac9SKenneth D. MerryPrint out the attribute number.
20815672fac9SKenneth D. Merry.It field_size
20825672fac9SKenneth D. MerryPrint out the attribute size.
20835672fac9SKenneth D. Merry.It field_rw
20845672fac9SKenneth D. MerryPrint out the attribute's readonly status.
20855672fac9SKenneth D. Merry.El
20865672fac9SKenneth D. Merry.It Fl p Ar part
20875672fac9SKenneth D. MerrySpecify the partition.
20885672fac9SKenneth D. MerryWhen the media has multiple partitions, specifying different partition
20895672fac9SKenneth D. Merrynumbers allows seeing the values for each individual partition.
20905672fac9SKenneth D. Merry.It Fl s Ar start_num
20915672fac9SKenneth D. MerrySpecify the starting attribute number.
20925672fac9SKenneth D. MerryThis requests that the target device return attribute information starting
20935672fac9SKenneth D. Merryat the given number.
20945672fac9SKenneth D. Merry.It Fl T Ar elem_type
20955672fac9SKenneth D. MerrySpecify the element type.
20965672fac9SKenneth D. MerryFor medium changer devices, this allows specifying the type the element
20975672fac9SKenneth D. Merryreferenced in the element address (
20985672fac9SKenneth D. Merry.Fl e ) .
20995672fac9SKenneth D. MerryValid types are:
21005672fac9SKenneth D. Merry.Dq all ,
21015672fac9SKenneth D. Merry.Dq picker ,
21025672fac9SKenneth D. Merry.Dq slot ,
21035672fac9SKenneth D. Merry.Dq portal ,
21045672fac9SKenneth D. Merryand
21055672fac9SKenneth D. Merry.Dq drive .
21065672fac9SKenneth D. Merry.It Fl V Ar vol_num
21075672fac9SKenneth D. MerrySpecify the number of the logical volume to operate on.
21085672fac9SKenneth D. MerryIf the media has multiple logical volumes, this will allow displaying
21095672fac9SKenneth D. Merryor writing attributes on the given logical volume.
21109a6844d5SKenneth D. Merry.El
21110e358df0SKenneth D. Merry.It Ic opcodes
21120e358df0SKenneth D. MerryIssue the REPORT SUPPORTED OPCODES service action of the
21130e358df0SKenneth D. Merry.Tn SCSI
21140e358df0SKenneth D. MerryMAINTENANCE IN
21150e358df0SKenneth D. Merrycommand.
21160e358df0SKenneth D. MerryWithout arguments, this command will return a list of all
21170e358df0SKenneth D. Merry.Tn SCSI
21180e358df0SKenneth D. Merrycommands supported by the device, including service actions of commands
21190e358df0SKenneth D. Merrythat support service actions.
21200e358df0SKenneth D. MerryIt will also include the
21210e358df0SKenneth D. Merry.Tn SCSI
21220e358df0SKenneth D. MerryCDB (Command Data Block) length for each command, and the description of
21230e358df0SKenneth D. Merryeach command if it is known.
21240e358df0SKenneth D. Merry.Bl -tag -width 18n
21250e358df0SKenneth D. Merry.It Fl o Ar opcode
21260e358df0SKenneth D. MerryRequest information on a specific opcode instead of the list of supported
21270e358df0SKenneth D. Merrycommands.
21280e358df0SKenneth D. MerryIf supported, the target will return a CDB-like structure that indicates
21290e358df0SKenneth D. Merrythe opcode, service action (if any), and a mask of bits that are supported
21300e358df0SKenneth D. Merryin that CDB.
21310e358df0SKenneth D. Merry.It Fl s Ar service_action
21320e358df0SKenneth D. MerryFor commands that support a service action, specify the service action to
21330e358df0SKenneth D. Merryquery.
21340e358df0SKenneth D. Merry.It Fl N
21350e358df0SKenneth D. MerryIf a service action is specified for a given opcode, and the device does
21360e358df0SKenneth D. Merrynot support the given service action, the device should not return a
21370e358df0SKenneth D. Merry.Tn SCSI
21380e358df0SKenneth D. Merryerror, but rather indicate in the returned parameter data that the command
21390e358df0SKenneth D. Merryis not supported.
21400e358df0SKenneth D. MerryBy default, if a service action is specified for an opcode, and service
21410e358df0SKenneth D. Merryactions are not supported for the opcode in question, the device will
21420e358df0SKenneth D. Merryreturn an error.
21430e358df0SKenneth D. Merry.It Fl T
21440e358df0SKenneth D. MerryInclude timeout values.
21450e358df0SKenneth D. MerryThis option works with the default display, which includes all commands
21460e358df0SKenneth D. Merrysupported by the device, and with the
21470e358df0SKenneth D. Merry.Fl o
21480e358df0SKenneth D. Merryand
21490e358df0SKenneth D. Merry.Fl s
21500e358df0SKenneth D. Merryoptions, which request information on a specific command and service
21510e358df0SKenneth D. Merryaction.
21520e358df0SKenneth D. MerryThis requests that the device report Nominal and Recommended timeout values
21530e358df0SKenneth D. Merryfor the given command or commands.
21540e358df0SKenneth D. MerryThe timeout values are in seconds.
21550e358df0SKenneth D. MerryThe timeout descriptor also includes a command-specific
21560e358df0SKenneth D. Merry.El
21579a6844d5SKenneth D. Merry.It Ic zone
21589a6844d5SKenneth D. MerryManage
21599a6844d5SKenneth D. Merry.Tn SCSI
21609a6844d5SKenneth D. Merryand
21619a6844d5SKenneth D. Merry.Tn ATA
21629a6844d5SKenneth D. MerryZoned Block devices.
21639a6844d5SKenneth D. MerryThis allows managing devices that conform to the
21649a6844d5SKenneth D. Merry.Tn SCSI
21659a6844d5SKenneth D. MerryZoned Block Commands (ZBC) and
21669a6844d5SKenneth D. Merry.Tn ATA
21679a6844d5SKenneth D. MerryZoned ATA Command Set (ZAC)
21689a6844d5SKenneth D. Merryspecifications.
21699a6844d5SKenneth D. MerryDevices using these command sets are usually hard drives using Shingled
21709a6844d5SKenneth D. MerryMagnetic Recording (SMR).
21719a6844d5SKenneth D. MerryThere are three types of SMR drives:
21729a6844d5SKenneth D. Merry.Bl -tag -width 13n
21739a6844d5SKenneth D. Merry.It Drive Managed
21749a6844d5SKenneth D. MerryDrive Managed drives look and act just like a standard random access block
21759a6844d5SKenneth D. Merrydevice, but underneath, the drive reads and writes the bulk of its capacity
21769a6844d5SKenneth D. Merryusing SMR zones.
21779a6844d5SKenneth D. MerrySequential writes will yield better performance, but writing sequentially
21789a6844d5SKenneth D. Merryis not required.
21799a6844d5SKenneth D. Merry.It Host Aware
21809a6844d5SKenneth D. MerryHost Aware drives expose the underlying zone layout via
21819a6844d5SKenneth D. Merry.Tn SCSI
21829a6844d5SKenneth D. Merryor
21839a6844d5SKenneth D. Merry.Tn ATA
21849a6844d5SKenneth D. Merrycommands and allow the host to manage the zone conditions.
21859a6844d5SKenneth D. MerryThe host is not required to manage the zones on the drive, though.
21869a6844d5SKenneth D. MerrySequential writes will yield better performance in Sequential Write
21879a6844d5SKenneth D. MerryPreferred zones, but the host can write randomly in those zones.
21889a6844d5SKenneth D. Merry.It Host Managed
21899a6844d5SKenneth D. MerryHost Managed drives expose the underlying zone layout via
21909a6844d5SKenneth D. Merry.Tn SCSI
21919a6844d5SKenneth D. Merryor
21929a6844d5SKenneth D. Merry.Tn ATA
21939a6844d5SKenneth D. Merrycommands.
21949a6844d5SKenneth D. MerryThe host is required to access the zones according to the rules described
21959a6844d5SKenneth D. Merryby the zone layout.
21969a6844d5SKenneth D. MerryAny commands that violate the rules will be returned with an error.
21979a6844d5SKenneth D. Merry.El
21989a6844d5SKenneth D. Merry.Pp
21999a6844d5SKenneth D. MerrySMR drives are divided into zones (typically in the range of 256MB each)
22009a6844d5SKenneth D. Merrythat fall into three general categories:
22019a6844d5SKenneth D. Merry.Bl -tag -width 20n
22029a6844d5SKenneth D. Merry.It Conventional
22039a6844d5SKenneth D. MerryThese are also known as Non Write Pointer zones.
22049a6844d5SKenneth D. MerryThese zones can be randomly written without an unexpected performance penalty.
22059a6844d5SKenneth D. Merry.It Sequential Preferred
22069a6844d5SKenneth D. MerryThese zones should be written sequentially starting at the write pointer
22079a6844d5SKenneth D. Merryfor the zone.
22089a6844d5SKenneth D. MerryThey may be written randomly.
22099a6844d5SKenneth D. MerryWrites that do not conform to the zone layout may be significantly slower
22109a6844d5SKenneth D. Merrythan expected.
22119a6844d5SKenneth D. Merry.It Sequential Required
22129a6844d5SKenneth D. MerryThese zones must be written sequentially.
22139a6844d5SKenneth D. MerryIf they are not written sequentially, starting at the write pointer, the
22149a6844d5SKenneth D. Merrycommand will fail.
22159a6844d5SKenneth D. Merry.El
22169a6844d5SKenneth D. Merry.Pp
22179a6844d5SKenneth D. Merry.Bl -tag -width 12n
22189a6844d5SKenneth D. Merry.It Fl c Ar cmd
22199a6844d5SKenneth D. MerrySpecify the zone subcommand:
22209a6844d5SKenneth D. Merry.Bl -tag -width 6n
22219a6844d5SKenneth D. Merry.It rz
22229a6844d5SKenneth D. MerryIssue the Report Zones command.
22239a6844d5SKenneth D. MerryAll zones are returned by default.
22249a6844d5SKenneth D. MerrySpecify report options with
22259a6844d5SKenneth D. Merry.Fl o
22269a6844d5SKenneth D. Merryand printing options with
22279a6844d5SKenneth D. Merry.Fl P .
22289a6844d5SKenneth D. MerrySpecify the starting LBA with
22299a6844d5SKenneth D. Merry.Fl l .
22309a6844d5SKenneth D. MerryNote that
22319a6844d5SKenneth D. Merry.Dq reportzones
22329a6844d5SKenneth D. Merryis also accepted as a command argument.
22339a6844d5SKenneth D. Merry.It open
22349a6844d5SKenneth D. MerryExplicitly open the zone specified by the starting LBA.
22359a6844d5SKenneth D. Merry.It close
22369a6844d5SKenneth D. MerryClose the zone specified by starting LBA.
22379a6844d5SKenneth D. Merry.It finish
22389a6844d5SKenneth D. MerryFinish the zone specified by the starting LBA.
22399a6844d5SKenneth D. Merry.It rwp
22409a6844d5SKenneth D. MerryReset the write pointer for the zone specified by the starting LBA.
22419a6844d5SKenneth D. Merry.El
22429a6844d5SKenneth D. Merry.It Fl a
22439a6844d5SKenneth D. MerryFor the Open, Close, Finish, and Reset Write Pointer operations, apply the
22449a6844d5SKenneth D. Merryoperation to all zones on the drive.
22459a6844d5SKenneth D. Merry.It Fl l Ar lba
22469a6844d5SKenneth D. MerrySpecify the starting LBA.
22479a6844d5SKenneth D. MerryFor the Report Zones command, this tells the drive to report starting with
22489a6844d5SKenneth D. Merrythe zone that starts at the given LBA.
22499a6844d5SKenneth D. MerryFor the other commands, this allows the user to identify the zone requested
22509a6844d5SKenneth D. Merryby its starting LBA.
22519a6844d5SKenneth D. MerryThe LBA may be specified in decimal, hexadecimal or octal notation.
22529a6844d5SKenneth D. Merry.It Fl o Ar rep_opt
22539a6844d5SKenneth D. MerryFor the Report Zones command, specify a subset of zones to report.
22549a6844d5SKenneth D. Merry.Bl -tag -width 8n
22559a6844d5SKenneth D. Merry.It all
22569a6844d5SKenneth D. MerryReport all zones.
22579a6844d5SKenneth D. MerryThis is the default.
22589a6844d5SKenneth D. Merry.It emtpy
22599a6844d5SKenneth D. MerryReport only empty zones.
22609a6844d5SKenneth D. Merry.It imp_open
22619a6844d5SKenneth D. MerryReport zones that are implicitly open.
22629a6844d5SKenneth D. MerryThis means that the host has sent a write to the zone without explicitly
22639a6844d5SKenneth D. Merryopening the zone.
22649a6844d5SKenneth D. Merry.It exp_open
22659a6844d5SKenneth D. MerryReport zones that are explicitly open.
22669a6844d5SKenneth D. Merry.It closed
22679a6844d5SKenneth D. MerryReport zones that have been closed by the host.
22689a6844d5SKenneth D. Merry.It full
22699a6844d5SKenneth D. MerryReport zones that are full.
22709a6844d5SKenneth D. Merry.It ro
22719a6844d5SKenneth D. MerryReport zones that are in the read only state.
22729a6844d5SKenneth D. MerryNote that
22739a6844d5SKenneth D. Merry.Dq readonly
22749a6844d5SKenneth D. Merryis also accepted as an argument.
22759a6844d5SKenneth D. Merry.It offline
22769a6844d5SKenneth D. MerryReport zones that are in the offline state.
22779a6844d5SKenneth D. Merry.It reset
22789a6844d5SKenneth D. MerryReport zones where the device recommends resetting write pointers.
22799a6844d5SKenneth D. Merry.It nonseq
22809a6844d5SKenneth D. MerryReport zones that have the Non Sequential Resources Active flag set.
22819a6844d5SKenneth D. MerryThese are zones that are Sequential Write Preferred, but have been written
22829a6844d5SKenneth D. Merrynon-sequentially.
22839a6844d5SKenneth D. Merry.It nonwp
22849a6844d5SKenneth D. MerryReport Non Write Pointer zones, also known as Conventional zones.
22859a6844d5SKenneth D. Merry.El
22869a6844d5SKenneth D. Merry.It Fl P Ar print_opt
22879a6844d5SKenneth D. MerrySpecify a printing option for Report Zones:
22889a6844d5SKenneth D. Merry.Bl -tag -width 7n
22899a6844d5SKenneth D. Merry.It normal
22909a6844d5SKenneth D. MerryNormal Report Zones output.
22919a6844d5SKenneth D. MerryThis is the default.
22929a6844d5SKenneth D. MerryThe summary and column headings are printed, fields are separated by spaces
22939a6844d5SKenneth D. Merryand the fields themselves may contain spaces.
22949a6844d5SKenneth D. Merry.It summary
22959a6844d5SKenneth D. MerryJust print the summary:  the number of zones, the maximum LBA (LBA of the
22969a6844d5SKenneth D. Merrylast logical block on the drive), and the value of the
22979a6844d5SKenneth D. Merry.Dq same
22989a6844d5SKenneth D. Merryfield.
22999a6844d5SKenneth D. MerryThe
23009a6844d5SKenneth D. Merry.Dq same
23019a6844d5SKenneth D. Merryfield describes whether the zones on the drive are all identical, all
23029a6844d5SKenneth D. Merrydifferent, or whether they are the same except for the last zone, etc.
23039a6844d5SKenneth D. Merry.It script
23049a6844d5SKenneth D. MerryPrint the zones in a script friendly format.
23059a6844d5SKenneth D. MerryThe summary and column headings are omitted, the fields are separated by
23069a6844d5SKenneth D. Merrycommas, and the fields do not contain spaces.
23079a6844d5SKenneth D. MerryThe fields contain underscores where spaces would normally be used.
23089a6844d5SKenneth D. Merry.El
23099a6844d5SKenneth D. Merry.El
23109a6844d5SKenneth D. Merry.It Ic epc
23119a6844d5SKenneth D. MerryIssue
23129a6844d5SKenneth D. Merry.Tn ATA
23139a6844d5SKenneth D. MerryExtended Power Conditions (EPC) feature set commands.
23149a6844d5SKenneth D. MerryThis only works on
23159a6844d5SKenneth D. Merry.Tn ATA
23169a6844d5SKenneth D. Merryprotocol drives, and will not work on
23179a6844d5SKenneth D. Merry.Tn SCSI
23189a6844d5SKenneth D. Merryprotocol drives.
23199a6844d5SKenneth D. MerryIt will work on
23209a6844d5SKenneth D. Merry.Tn SATA
23219a6844d5SKenneth D. Merrydrives behind a
23229a6844d5SKenneth D. Merry.Tn SCSI
23239a6844d5SKenneth D. Merryto
23249a6844d5SKenneth D. Merry.Tn ATA
23259a6844d5SKenneth D. Merrytranslation layer (SAT).
23269a6844d5SKenneth D. MerryIt may be helpful to read the ATA Command Set - 4 (ACS-4) description of
23279a6844d5SKenneth D. Merrythe Extended Power Conditions feature set, available at t13.org, to
23289a6844d5SKenneth D. Merryunderstand the details of this particular
23299a6844d5SKenneth D. Merry.Nm
23309a6844d5SKenneth D. Merrysubcommand.
23319a6844d5SKenneth D. Merry.Bl -tag -width 6n
23329a6844d5SKenneth D. Merry.It Fl c Ar cmd
23339a6844d5SKenneth D. MerrySpecify the epc subcommand
23349a6844d5SKenneth D. Merry.Bl -tag -width 7n
23359a6844d5SKenneth D. Merry.It restore
23369a6844d5SKenneth D. MerryRestore drive power condition settings.
23379a6844d5SKenneth D. Merry.Bl -tag -width 6n
23389a6844d5SKenneth D. Merry.It Fl r Ar src
23399a6844d5SKenneth D. MerrySpecify the source for the restored power settings, either
23409a6844d5SKenneth D. Merry.Dq default
23419a6844d5SKenneth D. Merryor
23429a6844d5SKenneth D. Merry.Dq saved .
23439a6844d5SKenneth D. MerryThis argument is required.
23449a6844d5SKenneth D. Merry.It Fl s
23459a6844d5SKenneth D. MerrySave the settings.
23469a6844d5SKenneth D. MerryThis only makes sense to specify when restoring from defaults.
23479a6844d5SKenneth D. Merry.El
23489a6844d5SKenneth D. Merry.It goto
23499a6844d5SKenneth D. MerryGo to the specified power condition.
23509a6844d5SKenneth D. Merry.Bl -tag -width 7n
23519a6844d5SKenneth D. Merry.It Fl p Ar cond
23529a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z.
23539a6844d5SKenneth D. MerryThis argument is required.
23549a6844d5SKenneth D. Merry.It Fl D
23559a6844d5SKenneth D. MerrySpecify delayed entry to the power condition.
23569a6844d5SKenneth D. MerryThe drive, if it supports this, can enter the power condition after the
23579a6844d5SKenneth D. Merrycommand completes.
23589a6844d5SKenneth D. Merry.It Fl H
23599a6844d5SKenneth D. MerryHold the power condition.
23609a6844d5SKenneth D. MerryIf the drive supports this option, it will hold the power condition and
23619a6844d5SKenneth D. Merryreject all commands that would normally cause it to exit that power
23629a6844d5SKenneth D. Merrycondition.
23639a6844d5SKenneth D. Merry.El
23649a6844d5SKenneth D. Merry.It timer
23659a6844d5SKenneth D. MerrySet the timer value for a power condition and enable or disable the
23669a6844d5SKenneth D. Merrycondition.
23679a6844d5SKenneth D. MerrySee the
23689a6844d5SKenneth D. Merry.Dq list
23699a6844d5SKenneth D. Merrydisplay described below to see what the current timer settings are for each
23709a6844d5SKenneth D. MerryIdle and Standby mode supported by the drive.
23719a6844d5SKenneth D. Merry.Bl -tag -width 8n
23729a6844d5SKenneth D. Merry.It Fl e
23739a6844d5SKenneth D. MerryEnable the power condition.
23749a6844d5SKenneth D. MerryOne of
23759a6844d5SKenneth D. Merry.Fl e
23769a6844d5SKenneth D. Merryor
23779a6844d5SKenneth D. Merry.Fl d
23789a6844d5SKenneth D. Merryis required.
23799a6844d5SKenneth D. Merry.It Fl d
23809a6844d5SKenneth D. MerryDisable the power condition.
23819a6844d5SKenneth D. MerryOne of
23829a6844d5SKenneth D. Merry.Fl d
23839a6844d5SKenneth D. Merryor
23849a6844d5SKenneth D. Merry.Fl e
23859a6844d5SKenneth D. Merryis required.
23869a6844d5SKenneth D. Merry.It Fl T Ar timer
23879a6844d5SKenneth D. MerrySpecify the timer in seconds.
23889a6844d5SKenneth D. MerryThe user may specify a timer as a floating point number with a maximum
23899a6844d5SKenneth D. Merrysupported resolution of tenths of a second.
23909a6844d5SKenneth D. MerryDrives may or may not support sub-second timer values.
23919a6844d5SKenneth D. Merry.It Fl p Ar cond
23929a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z.
23939a6844d5SKenneth D. MerryThis argument is required.
23949a6844d5SKenneth D. Merry.It Fl s
23959a6844d5SKenneth D. MerrySave the timer and power condition enable/disable state.
23969a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for
23979a6844d5SKenneth D. Merrythis power condition will be affected.
23989a6844d5SKenneth D. Merry.El
23999a6844d5SKenneth D. Merry.It state
24009a6844d5SKenneth D. MerryEnable or disable a particular power condition.
24019a6844d5SKenneth D. Merry.Bl -tag -width 7n
240277d9b0efSAlan Somers.It Fl e
240377d9b0efSAlan SomersEnable the power condition.
240477d9b0efSAlan SomersOne of
240577d9b0efSAlan Somers.Fl e
240677d9b0efSAlan Somersor
240777d9b0efSAlan Somers.Fl d
240877d9b0efSAlan Somersis required.
240977d9b0efSAlan Somers.It Fl d
241077d9b0efSAlan SomersDisable the power condition.
241177d9b0efSAlan SomersOne of
241277d9b0efSAlan Somers.Fl d
241377d9b0efSAlan Somersor
241477d9b0efSAlan Somers.Fl e
241577d9b0efSAlan Somersis required.
24169a6844d5SKenneth D. Merry.It Fl p Ar cond
24179a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z.
24189a6844d5SKenneth D. MerryThis argument is required.
24199a6844d5SKenneth D. Merry.It Fl s
24209a6844d5SKenneth D. MerrySave the power condition enable/disable state.
24219a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for
24229a6844d5SKenneth D. Merrythis power condition will be affected.
24239a6844d5SKenneth D. Merry.El
24249a6844d5SKenneth D. Merry.It enable
24259a6844d5SKenneth D. MerryEnable the Extended Power Condition (EPC) feature set.
24269a6844d5SKenneth D. Merry.It disable
24279a6844d5SKenneth D. MerryDisable the Extended Power Condition (EPC) feature set.
24289a6844d5SKenneth D. Merry.It source
24299a6844d5SKenneth D. MerrySpecify the EPC power source.
24309a6844d5SKenneth D. Merry.Bl -tag -width 6n
24319a6844d5SKenneth D. Merry.It Fl S Ar src
24329a6844d5SKenneth D. MerrySpecify the power source, either
24339a6844d5SKenneth D. Merry.Dq battery
24349a6844d5SKenneth D. Merryor
24359a6844d5SKenneth D. Merry.Dq nonbattery .
24369a6844d5SKenneth D. Merry.El
24379a6844d5SKenneth D. Merry.It status
24389a6844d5SKenneth D. MerryGet the current status of several parameters related to the Extended Power
24399a6844d5SKenneth D. MerryCondition (EPC) feature set, including whether APM and EPC are supported
24409a6844d5SKenneth D. Merryand enabled, whether Low Power Standby is supported, whether setting the
24419a6844d5SKenneth D. MerryEPC power source is supported, whether Low Power Standby is supported and
24429a6844d5SKenneth D. Merrythe current power condition.
24439a6844d5SKenneth D. Merry.Bl -tag -width 3n
24449a6844d5SKenneth D. Merry.It Fl P
24459a6844d5SKenneth D. MerryOnly report the current power condition.
24469a6844d5SKenneth D. MerrySome drives will exit their current power condition if a command other than
24479a6844d5SKenneth D. Merrythe
24489a6844d5SKenneth D. Merry.Tn ATA
24499a6844d5SKenneth D. MerryCHECK POWER MODE command is received.
24509a6844d5SKenneth D. MerryIf this flag is specified,
24519a6844d5SKenneth D. Merry.Nm
24529a6844d5SKenneth D. Merrywill only issue the
24539a6844d5SKenneth D. Merry.Tn ATA
24549a6844d5SKenneth D. MerryCHECK POWER MODE command to the drive.
24559a6844d5SKenneth D. Merry.El
24569a6844d5SKenneth D. Merry.It list
24579a6844d5SKenneth D. MerryDisplay the
24589a6844d5SKenneth D. Merry.Tn ATA
24599a6844d5SKenneth D. MerryPower Conditions log (Log Address 0x08).
24609a6844d5SKenneth D. MerryThis shows the list of Idle and Standby power conditions the drive
24619a6844d5SKenneth D. Merrysupports, and a number of parameters about each condition, including
24629a6844d5SKenneth D. Merrywhether it is enabled and what the timer value is.
24639a6844d5SKenneth D. Merry.El
24649a6844d5SKenneth D. Merry.El
246528db0a5eSKenneth D. Merry.It Ic timestamp
246628db0a5eSKenneth D. MerryIssue REPORT TIMESTAMP or SET TIMESTAMP
246728db0a5eSKenneth D. Merry.Tn SCSI
246828db0a5eSKenneth D. Merrycommands. Either the
246928db0a5eSKenneth D. Merry.Fl r
247028db0a5eSKenneth D. Merryoption or the
247128db0a5eSKenneth D. Merry.Fl s
247228db0a5eSKenneth D. Merryoption must be specified.
247328db0a5eSKenneth D. Merry.Bl -tag -width 6n
247428db0a5eSKenneth D. Merry.It Fl r
247528db0a5eSKenneth D. MerryReport the device's timestamp.
247628db0a5eSKenneth D. MerryIf no more arguments are specified, the timestamp will be reported using
247728db0a5eSKenneth D. Merrythe national representation of the date and time, followed by the time
247828db0a5eSKenneth D. Merryzone.
247928db0a5eSKenneth D. Merry.Bl -tag -width 9n
248028db0a5eSKenneth D. Merry.It Fl f Ar format
248128db0a5eSKenneth D. MerrySpecify the strftime format string, as documented in strftime(3), to be used
248228db0a5eSKenneth D. Merryto format the reported timestamp.
248328db0a5eSKenneth D. Merry.It Fl m
248428db0a5eSKenneth D. MerryReport the timestamp as milliseconds since the epoch.
248528db0a5eSKenneth D. Merry.It Fl U
248628db0a5eSKenneth D. MerryReport the timestamp using the national representation of the date and
248728db0a5eSKenneth D. Merrytime, but override the system time zone and use UTC instead.
248828db0a5eSKenneth D. Merry.El
248928db0a5eSKenneth D. Merry.El
249028db0a5eSKenneth D. Merry.Bl -tag -width 6n
249128db0a5eSKenneth D. Merry.It Fl s
249228db0a5eSKenneth D. MerrySet the device's timestamp. Either the
249328db0a5eSKenneth D. Merry.Fl f
249428db0a5eSKenneth D. Merryand
249528db0a5eSKenneth D. Merry.Fl T
249628db0a5eSKenneth D. Merryoptions or the
249728db0a5eSKenneth D. Merry.Fl U
249828db0a5eSKenneth D. Merryoption must be specified.
249928db0a5eSKenneth D. Merry.Bl -tag -width 9n
250028db0a5eSKenneth D. Merry.It Fl f Ar format
250128db0a5eSKenneth D. MerrySpecify the strptime format string, as documented in strptime(3).
250228db0a5eSKenneth D. MerryThe time must also be specified with the
250328db0a5eSKenneth D. Merry.Fl T
250428db0a5eSKenneth D. Merryoption.
2505d618624cSKenneth D. Merry.It Fl T Ar time
250628db0a5eSKenneth D. MerryProvide the time in the format specified with the
250728db0a5eSKenneth D. Merry.Fl f
250828db0a5eSKenneth D. Merryoption.
250928db0a5eSKenneth D. Merry.It Fl U
251028db0a5eSKenneth D. MerrySet the timestamp to the host system's time in UTC.
251128db0a5eSKenneth D. Merry.El
251228db0a5eSKenneth D. Merry.El
251333fab22eSKenneth D. Merry.It Ic help
25145a251d70SKenneth D. MerryPrint out verbose usage information.
2515525689f1SJustin T. Gibbs.El
2516525689f1SJustin T. Gibbs.Sh ENVIRONMENT
2517525689f1SJustin T. GibbsThe
2518525689f1SJustin T. Gibbs.Ev SCSI_MODES
2519525689f1SJustin T. Gibbsvariable allows the user to specify an alternate mode page format file.
2520525689f1SJustin T. Gibbs.Pp
2521525689f1SJustin T. GibbsThe
2522525689f1SJustin T. Gibbs.Ev EDITOR
2523525689f1SJustin T. Gibbsvariable determines which text editor
25247c7fb079SRuslan Ermilov.Nm
2525525689f1SJustin T. Gibbsstarts when editing mode pages.
2526525689f1SJustin T. Gibbs.Sh FILES
2527525689f1SJustin T. Gibbs.Bl -tag -width /usr/share/misc/scsi_modes -compact
2528525689f1SJustin T. Gibbs.It Pa /usr/share/misc/scsi_modes
2529525689f1SJustin T. Gibbsis the SCSI mode format database.
2530525689f1SJustin T. Gibbs.It Pa /dev/xpt0
2531525689f1SJustin T. Gibbsis the transport layer device.
2532525689f1SJustin T. Gibbs.It Pa /dev/pass*
2533525689f1SJustin T. Gibbsare the CAM application passthrough devices.
2534525689f1SJustin T. Gibbs.El
2535525689f1SJustin T. Gibbs.Sh EXAMPLES
2536525689f1SJustin T. Gibbs.Dl camcontrol eject -n cd -u 1 -v
2537525689f1SJustin T. Gibbs.Pp
2538525689f1SJustin T. GibbsEject the CD from cd1, and print SCSI sense information if the command
2539525689f1SJustin T. Gibbsfails.
2540525689f1SJustin T. Gibbs.Pp
2541b3550398SKenneth D. Merry.Dl camcontrol tur da0
2542525689f1SJustin T. Gibbs.Pp
2543525689f1SJustin T. GibbsSend the SCSI test unit ready command to da0.
2544e1205e80SPhilippe CharnierThe
25457c7fb079SRuslan Ermilov.Nm
2546e1205e80SPhilippe Charnierutility will report whether the disk is ready, but will not display sense
2547525689f1SJustin T. Gibbsinformation if the command fails since the
2548525689f1SJustin T. Gibbs.Fl v
2549525689f1SJustin T. Gibbsswitch was not specified.
2550c7938743SMike Pritchard.Bd -literal -offset indent
2551492a2ef5SKenneth D. Merrycamcontrol tur da1 -E -C 4 -t 50 -Q head -v
2552525689f1SJustin T. Gibbs.Ed
2553525689f1SJustin T. Gibbs.Pp
25549806e231SRuslan ErmilovSend a test unit ready command to da1.
25559806e231SRuslan ErmilovEnable kernel error recovery.
25569806e231SRuslan ErmilovSpecify a retry count of 4, and a timeout of 50 seconds.
25579806e231SRuslan ErmilovEnable sense
2558525689f1SJustin T. Gibbsprinting (with the
2559525689f1SJustin T. Gibbs.Fl v
25609806e231SRuslan Ermilovflag) if the command fails.
25619806e231SRuslan ErmilovSince error recovery is turned on, the
2562525689f1SJustin T. Gibbsdisk will be spun up if it is not currently spinning.
2563e1205e80SPhilippe CharnierThe
2564492a2ef5SKenneth D. Merry.Tn SCSI
2565492a2ef5SKenneth D. Merrytask attribute for the command will be set to Head of Queue.
2566492a2ef5SKenneth D. MerryThe
25677c7fb079SRuslan Ermilov.Nm
2568e1205e80SPhilippe Charnierutility will report whether the disk is ready.
2569c7938743SMike Pritchard.Bd -literal -offset indent
2570525689f1SJustin T. Gibbscamcontrol cmd -n cd -u 1 -v -c "3C 00 00 00 00 00 00 00 0e 00" \e
2571525689f1SJustin T. Gibbs	-i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1"
2572525689f1SJustin T. Gibbs.Ed
2573525689f1SJustin T. Gibbs.Pp
25749806e231SRuslan ErmilovIssue a READ BUFFER command (0x3C) to cd1.
25759806e231SRuslan ErmilovDisplay the buffer size of cd1,
25769806e231SRuslan Ermilovand display the first 10 bytes from the cache on cd1.
25779806e231SRuslan ErmilovDisplay SCSI sense
2578525689f1SJustin T. Gibbsinformation if the command fails.
2579c7938743SMike Pritchard.Bd -literal -offset indent
25808604fe2eSSADA Kenjicamcontrol cmd -n cd -u 1 -v -c "3B 00 00 00 00 00 00 00 0e 00" \e
2581525689f1SJustin T. Gibbs	-o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8
2582525689f1SJustin T. Gibbs.Ed
2583525689f1SJustin T. Gibbs.Pp
25849806e231SRuslan ErmilovIssue a WRITE BUFFER (0x3B) command to cd1.
25859806e231SRuslan ErmilovWrite out 10 bytes of data,
25869806e231SRuslan Ermilovnot including the (reserved) 4 byte header.
25879806e231SRuslan ErmilovPrint out sense information if
25889806e231SRuslan Ermilovthe command fails.
25899806e231SRuslan ErmilovBe very careful with this command, improper use may
2590525689f1SJustin T. Gibbscause data corruption.
2591c7938743SMike Pritchard.Bd -literal -offset indent
2592c60e19a8SKenneth D. Merrycamcontrol modepage da3 -m 1 -e -P 3
259394d09127SKenneth D. Merry.Ed
2594525689f1SJustin T. Gibbs.Pp
2595525689f1SJustin T. GibbsEdit mode page 1 (the Read-Write Error Recover page) for da3, and save the
25969806e231SRuslan Ermilovsettings on the drive.
25979806e231SRuslan ErmilovMode page 1 contains a disk drive's auto read and
2598525689f1SJustin T. Gibbswrite reallocation settings, among other things.
2599525689f1SJustin T. Gibbs.Pp
26005710d224SKenneth D. Merry.Dl camcontrol rescan all
26015710d224SKenneth D. Merry.Pp
2602db4fcadfSConrad MeyerRescan all SCSI buses in the system for devices that have been added,
26035710d224SKenneth D. Merryremoved or changed.
26045710d224SKenneth D. Merry.Pp
2605525689f1SJustin T. Gibbs.Dl camcontrol rescan 0
2606525689f1SJustin T. Gibbs.Pp
2607525689f1SJustin T. GibbsRescan SCSI bus 0 for devices that have been added, removed or changed.
2608525689f1SJustin T. Gibbs.Pp
2609525689f1SJustin T. Gibbs.Dl camcontrol rescan 0:1:0
2610525689f1SJustin T. Gibbs.Pp
2611525689f1SJustin T. GibbsRescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or
2612525689f1SJustin T. Gibbschanged.
26139deea857SKenneth D. Merry.Pp
2614c60e19a8SKenneth D. Merry.Dl camcontrol tags da5 -N 24
26159deea857SKenneth D. Merry.Pp
26169deea857SKenneth D. MerrySet the number of concurrent transactions for da5 to 24.
2617c7938743SMike Pritchard.Bd -literal -offset indent
26189deea857SKenneth D. Merrycamcontrol negotiate -n da -u 4 -T disable
26199deea857SKenneth D. Merry.Ed
26209deea857SKenneth D. Merry.Pp
26219deea857SKenneth D. MerryDisable tagged queueing for da4.
2622c7938743SMike Pritchard.Bd -literal -offset indent
26239deea857SKenneth D. Merrycamcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a
26249deea857SKenneth D. Merry.Ed
26259deea857SKenneth D. Merry.Pp
26269806e231SRuslan ErmilovNegotiate a sync rate of 20MHz and an offset of 15 with da3.
26279806e231SRuslan ErmilovThen send a
26289deea857SKenneth D. MerryTest Unit Ready command to make the settings take effect.
262906e79492SKenneth D. Merry.Bd -literal -offset indent
263006e79492SKenneth D. Merrycamcontrol smpcmd ses0 -v -r 4 "40 0 00 0" -R 1020 "s9 i1"
263106e79492SKenneth D. Merry.Ed
263206e79492SKenneth D. Merry.Pp
263306e79492SKenneth D. MerrySend the SMP REPORT GENERAL command to ses0, and display the number of PHYs
263406e79492SKenneth D. Merryit contains.
263506e79492SKenneth D. MerryDisplay SMP errors if the command fails.
26361146874aSSteven Hartland.Bd -literal -offset indent
26371146874aSSteven Hartlandcamcontrol security ada0
26381146874aSSteven Hartland.Ed
26391146874aSSteven Hartland.Pp
26401146874aSSteven HartlandReport security support and settings for ada0
26411146874aSSteven Hartland.Bd -literal -offset indent
264291804910SGavin Atkinsoncamcontrol security ada0 -U user -s MyPass
26431146874aSSteven Hartland.Ed
26441146874aSSteven Hartland.Pp
26451146874aSSteven HartlandEnable security on device ada0 with the password MyPass
26461146874aSSteven Hartland.Bd -literal -offset indent
264791804910SGavin Atkinsoncamcontrol security ada0 -U user -e MyPass
26481146874aSSteven Hartland.Ed
26491146874aSSteven Hartland.Pp
26501146874aSSteven HartlandSecure erase ada0 which has had security enabled with user password MyPass
26511146874aSSteven Hartland.Pp
26521146874aSSteven Hartland.Em WARNING! WARNING! WARNING!
26531146874aSSteven Hartland.Pp
26541146874aSSteven HartlandThis will
26551146874aSSteven Hartland.Em ERASE ALL
26561146874aSSteven Hartlanddata from the device, so backup your data before using!
26571146874aSSteven Hartland.Pp
26585bb17266SJoel DahlThis command can be used against an SSD drive to restoring it to
26591146874aSSteven Hartlandfactory default write performance.
26609e68761cSSteven Hartland.Bd -literal -offset indent
26619e68761cSSteven Hartlandcamcontrol hpa ada0
26629e68761cSSteven Hartland.Ed
26639e68761cSSteven Hartland.Pp
26649e68761cSSteven HartlandReport HPA support and settings for ada0 (also reported via
26659e68761cSSteven Hartlandidentify).
26669e68761cSSteven Hartland.Bd -literal -offset indent
26679e68761cSSteven Hartlandcamcontrol hpa ada0 -s 10240
26689e68761cSSteven Hartland.Ed
26699e68761cSSteven Hartland.Pp
26709e68761cSSteven HartlandEnables HPA on ada0 setting the maximum reported sectors to 10240.
26719e68761cSSteven Hartland.Pp
26729e68761cSSteven Hartland.Em WARNING! WARNING! WARNING!
26739e68761cSSteven Hartland.Pp
26749e68761cSSteven HartlandThis will
26759e68761cSSteven Hartland.Em PREVENT ACCESS
26769e68761cSSteven Hartlandto all data on the device beyond this limit until HPA is disabled by setting
26779e68761cSSteven HartlandHPA to native max sectors of the device, which can only be done after a
26789e68761cSSteven Hartlandpower-on or hardware reset!
26799e68761cSSteven Hartland.Pp
26809e68761cSSteven Hartland.Em DO NOT
26819e68761cSSteven Hartlanduse this on a device which has an active filesystem!
268208df2e3eSKenneth D. Merry.Bd -literal -offset indent
268308df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_keys
268408df2e3eSKenneth D. Merry.Ed
268508df2e3eSKenneth D. Merry.Pp
268608df2e3eSKenneth D. MerryThis will read any persistent reservation keys registered with da0, and
268708df2e3eSKenneth D. Merrydisplay any errors encountered when sending the PERSISTENT RESERVE IN
268808df2e3eSKenneth D. Merry.Tn SCSI
268908df2e3eSKenneth D. Merrycommand.
269008df2e3eSKenneth D. Merry.Bd -literal -offset indent
269108df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -a -K 0x12345678
269208df2e3eSKenneth D. Merry.Ed
269308df2e3eSKenneth D. Merry.Pp
269408df2e3eSKenneth D. MerryThis will register the persistent reservation key 0x12345678 with da0,
269508df2e3eSKenneth D. Merryapply that registration to all ports on da0, and display any errors that
269608df2e3eSKenneth D. Merryoccur when sending the PERSISTENT RESERVE OUT command.
269708df2e3eSKenneth D. Merry.Bd -literal -offset indent
269808df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o reserve -s lun -k 0x12345678 -T ex_ac
269908df2e3eSKenneth D. Merry.Ed
270008df2e3eSKenneth D. Merry.Pp
270108df2e3eSKenneth D. MerryThis will reserve da0 for the exlusive use of the initiator issuing the
270208df2e3eSKenneth D. Merrycommand.
270308df2e3eSKenneth D. MerryThe scope of the reservation is the entire LUN.
270408df2e3eSKenneth D. MerryAny errors sending the PERSISTENT RESERVE OUT command will be displayed.
270508df2e3eSKenneth D. Merry.Bd -literal -offset indent
270608df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_full
270708df2e3eSKenneth D. Merry.Ed
270808df2e3eSKenneth D. Merry.Pp
270908df2e3eSKenneth D. MerryThis will display the full status of all reservations on da0 and print out
271008df2e3eSKenneth D. Merrystatus if there are any errors.
271108df2e3eSKenneth D. Merry.Bd -literal -offset indent
271208df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o release -k 0x12345678 -T ex_ac
271308df2e3eSKenneth D. Merry.Ed
271408df2e3eSKenneth D. Merry.Pp
271508df2e3eSKenneth D. MerryThis will release a reservation on da0 of the type ex_ac
271608df2e3eSKenneth D. Merry(Exclusive Access).
271708df2e3eSKenneth D. MerryThe Reservation Key for this registration is 0x12345678.
271808df2e3eSKenneth D. MerryAny errors that occur will be displayed.
271908df2e3eSKenneth D. Merry.Bd -literal -offset indent
272008df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -K 0x12345678 -S \e
272108df2e3eSKenneth D. Merry	-I sas,0x1234567812345678 -I sas,0x8765432187654321
272208df2e3eSKenneth D. Merry.Ed
272308df2e3eSKenneth D. Merry.Pp
272408df2e3eSKenneth D. MerryThis will register the key 0x12345678 with da0, specifying that it applies
272508df2e3eSKenneth D. Merryto the SAS initiators with SAS addresses 0x1234567812345678 and
272608df2e3eSKenneth D. Merry0x8765432187654321.
272708df2e3eSKenneth D. Merry.Bd -literal -offset indent
272808df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register_move -k 0x87654321 \e
272908df2e3eSKenneth D. Merry	-K 0x12345678 -U -p -R 2 -I fcp,0x1234567812345678
273008df2e3eSKenneth D. Merry.Ed
273108df2e3eSKenneth D. Merry.Pp
273208df2e3eSKenneth D. MerryThis will move the registration from the current initiator, whose
273308df2e3eSKenneth D. MerryRegistration Key is 0x87654321, to the Fibre Channel initiator with the
273408df2e3eSKenneth D. MerryFiber Channel World Wide Node Name 0x1234567812345678.
273508df2e3eSKenneth D. MerryA new registration key, 0x12345678, will be registered for the initiator
273608df2e3eSKenneth D. Merrywith the Fibre Channel World Wide Node Name 0x1234567812345678, and the
273708df2e3eSKenneth D. Merrycurrent initiator will be unregistered from the target.
273808df2e3eSKenneth D. MerryThe reservation will be moved to relative target port 2 on the target
273908df2e3eSKenneth D. Merrydevice.
274008df2e3eSKenneth D. MerryThe registration will persist across power losses.
27415672fac9SKenneth D. Merry.Bd -literal -offset indent
27425672fac9SKenneth D. Merrycamcontrol attrib sa0 -v -i attr_values -p 1
27435672fac9SKenneth D. Merry.Ed
27445672fac9SKenneth D. Merry.Pp
27455672fac9SKenneth D. MerryThis will read and decode the attribute values from partition 1 on the tape
27465672fac9SKenneth D. Merryin tape drive sa0, and will display any
27475672fac9SKenneth D. Merry.Tn SCSI
27485672fac9SKenneth D. Merryerrors that result.
27499a6844d5SKenneth D. Merry.Pp
27509a6844d5SKenneth D. Merry.Bd -literal -offset indent
27519a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -P summary
27529a6844d5SKenneth D. Merry.Ed
27539a6844d5SKenneth D. Merry.Pp
27549a6844d5SKenneth D. MerryThis will request the SMR zone list from disk da0, and print out a
27559a6844d5SKenneth D. Merrysummary of the zone parameters, and display any
27569a6844d5SKenneth D. Merry.Tn SCSI
27579a6844d5SKenneth D. Merryor
27589a6844d5SKenneth D. Merry.Tn ATA
27599a6844d5SKenneth D. Merryerrors that result.
27609a6844d5SKenneth D. Merry.Pp
27619a6844d5SKenneth D. Merry.Bd -literal -offset indent
27629a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -o reset
27639a6844d5SKenneth D. Merry.Ed
27649a6844d5SKenneth D. Merry.Pp
27659a6844d5SKenneth D. MerryThis will request the list of SMR zones that should have their write
27669a6844d5SKenneth D. Merrypointer reset from the disk da0, and display any
27679a6844d5SKenneth D. Merry.Tn SCSI
27689a6844d5SKenneth D. Merryor
27699a6844d5SKenneth D. Merry.Tn ATA
27709a6844d5SKenneth D. Merryerrors that result.
27719a6844d5SKenneth D. Merry.Pp
27729a6844d5SKenneth D. Merry.Bd -literal -offset indent
27739a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rwp -l 0x2c80000
27749a6844d5SKenneth D. Merry.Ed
27759a6844d5SKenneth D. Merry.Pp
27769a6844d5SKenneth D. MerryThis will issue the Reset Write Pointer command to disk da0 for the zone
27779a6844d5SKenneth D. Merrythat starts at LBA 0x2c80000 and display any
27789a6844d5SKenneth D. Merry.Tn SCSI
27799a6844d5SKenneth D. Merryor
27809a6844d5SKenneth D. Merry.Tn ATA
27819a6844d5SKenneth D. Merryerrors that result.
27829a6844d5SKenneth D. Merry.Pp
27839a6844d5SKenneth D. Merry.Bd -literal -offset indent
27849a6844d5SKenneth D. Merrycamcontrol epc ada0 -c timer -T 60.1 -p Idle_a -e -s
27859a6844d5SKenneth D. Merry.Ed
27869a6844d5SKenneth D. Merry.Pp
27879a6844d5SKenneth D. MerrySet the timer for the Idle_a power condition on drive
27889a6844d5SKenneth D. Merry.Pa ada0
27899a6844d5SKenneth D. Merryto 60.1 seconds, enable that particular power condition, and save the timer
27909a6844d5SKenneth D. Merryvalue and the enabled state of the power condition.
27919a6844d5SKenneth D. Merry.Pp
27929a6844d5SKenneth D. Merry.Bd -literal -offset indent
27939a6844d5SKenneth D. Merrycamcontrol epc da4 -c goto -p Standby_z -H
27949a6844d5SKenneth D. Merry.Ed
27959a6844d5SKenneth D. Merry.Pp
27969a6844d5SKenneth D. MerryTell drive
27979a6844d5SKenneth D. Merry.Pa da4
27989a6844d5SKenneth D. Merryto go to the Standby_z power state (which is
27999a6844d5SKenneth D. Merrythe drive's lowest power state) and hold in that state until it is
28009a6844d5SKenneth D. Merryexplicitly released by another
28019a6844d5SKenneth D. Merry.Cm goto
28029a6844d5SKenneth D. Merrycommand.
28039a6844d5SKenneth D. Merry.Pp
28049a6844d5SKenneth D. Merry.Bd -literal -offset indent
28059a6844d5SKenneth D. Merrycamcontrol epc da2 -c status -P
28069a6844d5SKenneth D. Merry.Ed
28079a6844d5SKenneth D. Merry.Pp
28089a6844d5SKenneth D. MerryReport only the power state of
28099a6844d5SKenneth D. Merrydrive
28109a6844d5SKenneth D. Merry.Pa da2 .
28119a6844d5SKenneth D. MerrySome drives will power up in response to the commands sent by the
28129a6844d5SKenneth D. Merry.Pa status
28139a6844d5SKenneth D. Merrysubcommand, and the
28149a6844d5SKenneth D. Merry.Fl P
28159a6844d5SKenneth D. Merryoption causes
28169a6844d5SKenneth D. Merry.Nm
28179a6844d5SKenneth D. Merryto only send the
28189a6844d5SKenneth D. Merry.Tn ATA
28199a6844d5SKenneth D. MerryCHECK POWER MODE command, which should not trigger a change in the drive's
28209a6844d5SKenneth D. Merrypower state.
28219a6844d5SKenneth D. Merry.Pp
28229a6844d5SKenneth D. Merry.Bd -literal -offset indent
28239a6844d5SKenneth D. Merrycamcontrol epc ada0 -c list
28249a6844d5SKenneth D. Merry.Ed
28259a6844d5SKenneth D. Merry.Pp
28269a6844d5SKenneth D. MerryDisplay the ATA Power Conditions log (Log Address 0x08) for
28279a6844d5SKenneth D. Merrydrive
28289a6844d5SKenneth D. Merry.Pa ada0 .
282928db0a5eSKenneth D. Merry.Pp
283028db0a5eSKenneth D. Merry.Bd -literal -offset indent
2831d618624cSKenneth D. Merrycamcontrol timestamp sa0 -s -f "%a, %d %b %Y %T %z" \e
2832d618624cSKenneth D. Merry	-T "Wed, 26 Oct 2016 21:43:57 -0600"
283328db0a5eSKenneth D. Merry.Ed
283428db0a5eSKenneth D. Merry.Pp
283528db0a5eSKenneth D. MerrySet the timestamp of drive
283628db0a5eSKenneth D. Merry.Pa sa0
283728db0a5eSKenneth D. Merryusing a
283828db0a5eSKenneth D. Merry.Xr strptime 3
283928db0a5eSKenneth D. Merryformat string followed by a time string
284028db0a5eSKenneth D. Merrythat was created using this format string.
2841525689f1SJustin T. Gibbs.Sh SEE ALSO
2842525689f1SJustin T. Gibbs.Xr cam 3 ,
28439deea857SKenneth D. Merry.Xr cam_cdbparse 3 ,
2844c0bdb22bSMatthew Hunt.Xr cam 4 ,
2845525689f1SJustin T. Gibbs.Xr pass 4 ,
2846c0bdb22bSMatthew Hunt.Xr xpt 4
2847525689f1SJustin T. Gibbs.Sh HISTORY
2848525689f1SJustin T. GibbsThe
28497c7fb079SRuslan Ermilov.Nm
2850e1205e80SPhilippe Charnierutility first appeared in
2851525689f1SJustin T. Gibbs.Fx 3.0 .
2852525689f1SJustin T. Gibbs.Pp
2853525689f1SJustin T. GibbsThe mode page editing code and arbitrary SCSI command code are based upon
2854525689f1SJustin T. Gibbscode in the old
2855525689f1SJustin T. Gibbs.Xr scsi 8
2856525689f1SJustin T. Gibbsutility and
2857525689f1SJustin T. Gibbs.Xr scsi 3
28589806e231SRuslan Ermilovlibrary, written by Julian Elischer and Peter Dufault.
28599806e231SRuslan ErmilovThe
2860525689f1SJustin T. Gibbs.Xr scsi 8
2861753d686dSRuslan Ermilovprogram first appeared in
2862753d686dSRuslan Ermilov.Bx 386 0.1.2.4 ,
2863753d686dSRuslan Ermilovand first appeared in
286433fab22eSKenneth D. Merry.Fx
2865525689f1SJustin T. Gibbsin
2866525689f1SJustin T. Gibbs.Fx 2.0.5 .
2867525689f1SJustin T. Gibbs.Sh AUTHORS
2868bd0891ceSBaptiste Daroussin.An Kenneth Merry Aq Mt ken@FreeBSD.org
2869525689f1SJustin T. Gibbs.Sh BUGS
28700227791bSRuslan ErmilovThe code that parses the generic command line arguments does not know that
28719806e231SRuslan Ermilovsome of the subcommands take multiple arguments.
28729806e231SRuslan ErmilovSo if, for instance, you
2873525689f1SJustin T. Gibbstried something like this:
2874c7938743SMike Pritchard.Bd -literal -offset indent
2875b9e3972aSKenneth D. Merrycamcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v
2876525689f1SJustin T. Gibbs.Ed
2877525689f1SJustin T. Gibbs.Pp
2878525689f1SJustin T. GibbsThe sense information from the test unit ready command would not get
2879525689f1SJustin T. Gibbsprinted out, since the first
2880525689f1SJustin T. Gibbs.Xr getopt 3
2881525689f1SJustin T. Gibbscall in
28827c7fb079SRuslan Ermilov.Nm
2883525689f1SJustin T. Gibbsbails out when it sees the second argument to
2884525689f1SJustin T. Gibbs.Fl c
2885c4d9468eSRuslan Ermilov(0x00),
28869806e231SRuslan Ermilovabove.
28879806e231SRuslan ErmilovFixing this behavior would take some gross code, or changes to the
2888525689f1SJustin T. Gibbs.Xr getopt 3
28899806e231SRuslan Ermilovinterface.
28909806e231SRuslan ErmilovThe best way to circumvent this problem is to always make sure
2891525689f1SJustin T. Gibbsto specify generic
28927c7fb079SRuslan Ermilov.Nm
2893525689f1SJustin T. Gibbsarguments before any command-specific arguments.
2894