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.\" 30d4cf7dc0SFelix Johnson.Dd October 20, 2021 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 81b9dd559aSWarner 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 125e341cfd2SAlexander Motin.Op Fl 6 12654644e21SAlexander Motin.Aq Fl m Ar page[,subpage] | Fl l 1271ac2383cSBill Fumerola.Op Fl P Ar pgctl 12809128776SAlexander Motin.Op Fl D 12909128776SAlexander Motin.Op Fl L 1307e32b20dSKelly Yancey.Op Fl b | Fl e 131525689f1SJustin T. Gibbs.Op Fl d 1327c7fb079SRuslan Ermilov.Nm 13333fab22eSKenneth D. Merry.Ic cmd 134c60e19a8SKenneth D. Merry.Op device id 135525689f1SJustin T. Gibbs.Op generic args 13680976615SAlexander Motin.Aq Fl a Ar cmd Op args 137525689f1SJustin T. Gibbs.Aq Fl c Ar cmd Op args 138f930c0dbSAlexander Motin.Op Fl d 139f930c0dbSAlexander Motin.Op Fl f 140525689f1SJustin T. Gibbs.Op Fl i Ar len Ar fmt 141525689f1SJustin T. Gibbs.Bk -words 142525689f1SJustin T. Gibbs.Op Fl o Ar len Ar fmt Op args 14380976615SAlexander Motin.Op Fl r Ar fmt 144525689f1SJustin T. Gibbs.Ek 1457c7fb079SRuslan Ermilov.Nm 14606e79492SKenneth D. Merry.Ic smpcmd 14706e79492SKenneth D. Merry.Op device id 14806e79492SKenneth D. Merry.Op generic args 14906e79492SKenneth D. Merry.Aq Fl r Ar len Ar fmt Op args 15006e79492SKenneth D. Merry.Aq Fl R Ar len Ar fmt Op args 15106e79492SKenneth D. Merry.Nm 15206e79492SKenneth D. Merry.Ic smprg 15306e79492SKenneth D. Merry.Op device id 15406e79492SKenneth D. Merry.Op generic args 15506e79492SKenneth D. Merry.Op Fl l 15606e79492SKenneth D. Merry.Nm 15706e79492SKenneth D. Merry.Ic smppc 15806e79492SKenneth D. Merry.Op device id 15906e79492SKenneth D. Merry.Op generic args 16006e79492SKenneth D. Merry.Aq Fl p Ar phy 16106e79492SKenneth D. Merry.Op Fl l 16206e79492SKenneth D. Merry.Op Fl o Ar operation 16306e79492SKenneth D. Merry.Op Fl d Ar name 16406e79492SKenneth D. Merry.Op Fl m Ar rate 16506e79492SKenneth D. Merry.Op Fl M Ar rate 16606e79492SKenneth D. Merry.Op Fl T Ar pp_timeout 16706e79492SKenneth D. Merry.Op Fl a Ar enable|disable 16806e79492SKenneth D. Merry.Op Fl A Ar enable|disable 16906e79492SKenneth D. Merry.Op Fl s Ar enable|disable 17006e79492SKenneth D. Merry.Op Fl S Ar enable|disable 17106e79492SKenneth D. Merry.Nm 17206e79492SKenneth D. Merry.Ic smpphylist 17306e79492SKenneth D. Merry.Op device id 17406e79492SKenneth D. Merry.Op generic args 17506e79492SKenneth D. Merry.Op Fl l 17606e79492SKenneth D. Merry.Op Fl q 17706e79492SKenneth D. Merry.Nm 17806e79492SKenneth D. Merry.Ic smpmaninfo 17906e79492SKenneth D. Merry.Op device id 18006e79492SKenneth D. Merry.Op generic args 18106e79492SKenneth D. Merry.Op Fl l 18206e79492SKenneth D. Merry.Nm 18333fab22eSKenneth D. Merry.Ic debug 184525689f1SJustin T. Gibbs.Op Fl I 185a7e5261eSNate Lawson.Op Fl P 186525689f1SJustin T. Gibbs.Op Fl T 187525689f1SJustin T. Gibbs.Op Fl S 188a7e5261eSNate Lawson.Op Fl X 18994d09127SKenneth D. Merry.Op Fl c 190fbfb753fSAlexander Motin.Op Fl p 191512efccfSAlexander Motin.Aq all | off | device id | bus Ns Op :target Ns Op :lun 1927c7fb079SRuslan Ermilov.Nm 19333fab22eSKenneth D. Merry.Ic tags 194c60e19a8SKenneth D. Merry.Op device id 1959deea857SKenneth D. Merry.Op generic args 1969deea857SKenneth D. Merry.Op Fl N Ar tags 1979deea857SKenneth D. Merry.Op Fl q 1989deea857SKenneth D. Merry.Op Fl v 1997c7fb079SRuslan Ermilov.Nm 20033fab22eSKenneth D. Merry.Ic negotiate 201c60e19a8SKenneth D. Merry.Op device id 2029deea857SKenneth D. Merry.Op generic args 2039deea857SKenneth D. Merry.Op Fl c 2049deea857SKenneth D. Merry.Op Fl D Ar enable|disable 205b447e682SAlexander Motin.Op Fl M Ar mode 2069deea857SKenneth D. Merry.Op Fl O Ar offset 2079deea857SKenneth D. Merry.Op Fl q 2089deea857SKenneth D. Merry.Op Fl R Ar syncrate 2099deea857SKenneth D. Merry.Op Fl T Ar enable|disable 2109deea857SKenneth D. Merry.Op Fl U 2119deea857SKenneth D. Merry.Op Fl W Ar bus_width 2129deea857SKenneth D. Merry.Op Fl v 2137c7fb079SRuslan Ermilov.Nm 21433fab22eSKenneth D. Merry.Ic format 21596a93c63SKenneth D. Merry.Op device id 21696a93c63SKenneth D. Merry.Op generic args 21796a93c63SKenneth D. Merry.Op Fl q 218e9e4d3e4SKenneth D. Merry.Op Fl r 21996a93c63SKenneth D. Merry.Op Fl w 22096a93c63SKenneth D. Merry.Op Fl y 2217c7fb079SRuslan Ermilov.Nm 222ffead710SBryan Venteicher.Ic sanitize 223ffead710SBryan Venteicher.Op device id 224ffead710SBryan Venteicher.Op generic args 225ffead710SBryan Venteicher.Aq Fl a Ar overwrite | block | crypto | exitfailure 226ffead710SBryan Venteicher.Op Fl c Ar passes 227ffead710SBryan Venteicher.Op Fl I 228ffead710SBryan Venteicher.Op Fl P Ar pattern 229ffead710SBryan Venteicher.Op Fl q 230ffead710SBryan Venteicher.Op Fl U 231ffead710SBryan Venteicher.Op Fl r 232ffead710SBryan Venteicher.Op Fl w 233ffead710SBryan Venteicher.Op Fl y 234ffead710SBryan Venteicher.Nm 23550c9a276SAlexander Motin.Ic idle 23650c9a276SAlexander Motin.Op device id 23750c9a276SAlexander Motin.Op generic args 23850c9a276SAlexander Motin.Op Fl t Ar time 23950c9a276SAlexander Motin.Nm 24050c9a276SAlexander Motin.Ic standby 24150c9a276SAlexander Motin.Op device id 24250c9a276SAlexander Motin.Op generic args 24350c9a276SAlexander Motin.Op Fl t Ar time 24450c9a276SAlexander Motin.Nm 24550c9a276SAlexander Motin.Ic sleep 24650c9a276SAlexander Motin.Op device id 24750c9a276SAlexander Motin.Op generic args 24850c9a276SAlexander Motin.Nm 2493bed0179SSteven Hartland.Ic powermode 2503bed0179SSteven Hartland.Op device id 2513bed0179SSteven Hartland.Op generic args 2523bed0179SSteven Hartland.Nm 253e7affda5SAlexander Motin.Ic apm 254e7affda5SAlexander Motin.Op device id 255e7affda5SAlexander Motin.Op generic args 256e7affda5SAlexander Motin.Op Fl l Ar level 257e7affda5SAlexander Motin.Nm 258e7affda5SAlexander Motin.Ic aam 259e7affda5SAlexander Motin.Op device id 260e7affda5SAlexander Motin.Op generic args 261e7affda5SAlexander Motin.Op Fl l Ar level 262e7affda5SAlexander Motin.Nm 2631f4782a4SEd Maste.Ic fwdownload 2641f4782a4SEd Maste.Op device id 2651f4782a4SEd Maste.Op generic args 2661f4782a4SEd Maste.Aq Fl f Ar fw_image 2670e358df0SKenneth D. Merry.Op Fl q 2681f4782a4SEd Maste.Op Fl s 2690e358df0SKenneth D. Merry.Op Fl y 2701f4782a4SEd Maste.Nm 2711146874aSSteven Hartland.Ic security 2721146874aSSteven Hartland.Op device id 2731146874aSSteven Hartland.Op generic args 2741146874aSSteven Hartland.Op Fl d Ar pwd 2751146874aSSteven Hartland.Op Fl e Ar pwd 2761146874aSSteven Hartland.Op Fl f 2771146874aSSteven Hartland.Op Fl h Ar pwd 2781146874aSSteven Hartland.Op Fl k Ar pwd 2791146874aSSteven Hartland.Op Fl l Ar high|maximum 2801146874aSSteven Hartland.Op Fl q 2811146874aSSteven Hartland.Op Fl s Ar pwd 2821146874aSSteven Hartland.Op Fl T Ar timeout 2831146874aSSteven Hartland.Op Fl U Ar user|master 2841146874aSSteven Hartland.Op Fl y 2851146874aSSteven Hartland.Nm 2869e68761cSSteven Hartland.Ic hpa 2879e68761cSSteven Hartland.Op device id 2889e68761cSSteven Hartland.Op generic args 2899e68761cSSteven Hartland.Op Fl f 2909e68761cSSteven Hartland.Op Fl l 2919e68761cSSteven Hartland.Op Fl P 2929e68761cSSteven Hartland.Op Fl p Ar pwd 2939e68761cSSteven Hartland.Op Fl q 2949e68761cSSteven Hartland.Op Fl s Ar max_sectors 2959e68761cSSteven Hartland.Op Fl U Ar pwd 2969e68761cSSteven Hartland.Op Fl y 2979e68761cSSteven Hartland.Nm 29889b35a52SAlexander Motin.Ic ama 29989b35a52SAlexander Motin.Op device id 30089b35a52SAlexander Motin.Op generic args 30189b35a52SAlexander Motin.Op Fl f 30289b35a52SAlexander Motin.Op Fl q 30389b35a52SAlexander Motin.Op Fl s Ar max_sectors 30489b35a52SAlexander Motin.Nm 30508df2e3eSKenneth D. Merry.Ic persist 30608df2e3eSKenneth D. Merry.Op device id 30708df2e3eSKenneth D. Merry.Op generic args 30808df2e3eSKenneth D. Merry.Aq Fl i Ar action | Fl o Ar action 30908df2e3eSKenneth D. Merry.Op Fl a 31008df2e3eSKenneth D. Merry.Op Fl I Ar trans_id 31108df2e3eSKenneth D. Merry.Op Fl k Ar key 31208df2e3eSKenneth D. Merry.Op Fl K Ar sa_key 31308df2e3eSKenneth D. Merry.Op Fl p 31408df2e3eSKenneth D. Merry.Op Fl R Ar rel_tgt_port 31508df2e3eSKenneth D. Merry.Op Fl s Ar scope 31608df2e3eSKenneth D. Merry.Op Fl S 31708df2e3eSKenneth D. Merry.Op Fl T Ar res_type 31808df2e3eSKenneth D. Merry.Op Fl U 31908df2e3eSKenneth D. Merry.Nm 3205672fac9SKenneth D. Merry.Ic attrib 3215672fac9SKenneth D. Merry.Op device id 3225672fac9SKenneth D. Merry.Op generic args 3235672fac9SKenneth D. Merry.Aq Fl r Ar action | Fl w Ar attrib 3245672fac9SKenneth D. Merry.Op Fl a Ar attr_num 3255672fac9SKenneth D. Merry.Op Fl c 3265672fac9SKenneth D. Merry.Op Fl e Ar elem_addr 3275672fac9SKenneth D. Merry.Op Fl F Ar form1,form2 3285672fac9SKenneth D. Merry.Op Fl p Ar part 3295672fac9SKenneth D. Merry.Op Fl s Ar start_addr 3305672fac9SKenneth D. Merry.Op Fl T Ar elem_type 3315672fac9SKenneth D. Merry.Op Fl V Ar lv_num 3325672fac9SKenneth D. Merry.Nm 3330e358df0SKenneth D. Merry.Ic opcodes 3340e358df0SKenneth D. Merry.Op device id 3350e358df0SKenneth D. Merry.Op generic args 3360e358df0SKenneth D. Merry.Op Fl o Ar opcode 3370e358df0SKenneth D. Merry.Op Fl s Ar service_action 3380e358df0SKenneth D. Merry.Op Fl N 3390e358df0SKenneth D. Merry.Op Fl T 3400e358df0SKenneth D. Merry.Nm 3419a6844d5SKenneth D. Merry.Ic zone 3429a6844d5SKenneth D. Merry.Aq Fl c Ar cmd 3439a6844d5SKenneth D. Merry.Op Fl a 3449a6844d5SKenneth D. Merry.Op Fl l Ar lba 3459a6844d5SKenneth D. Merry.Op Fl o Ar rep_opts 3469a6844d5SKenneth D. Merry.Op Fl P Ar print_opts 3479a6844d5SKenneth D. Merry.Nm 3489a6844d5SKenneth D. Merry.Ic epc 3499a6844d5SKenneth D. Merry.Aq Fl c Ar cmd 3509a6844d5SKenneth D. Merry.Op Fl d 3519a6844d5SKenneth D. Merry.Op Fl D 3529a6844d5SKenneth D. Merry.Op Fl e 3539a6844d5SKenneth D. Merry.Op Fl H 3549a6844d5SKenneth D. Merry.Op Fl p Ar power_cond 3559a6844d5SKenneth D. Merry.Op Fl P 3569a6844d5SKenneth D. Merry.Op Fl r Ar restore_src 3579a6844d5SKenneth D. Merry.Op Fl s 3589a6844d5SKenneth D. Merry.Op Fl S Ar power_src 3599a6844d5SKenneth D. Merry.Op Fl T Ar timer 3609a6844d5SKenneth D. Merry.Nm 36128db0a5eSKenneth D. Merry.Ic timestamp 36228db0a5eSKenneth D. Merry.Op device id 36328db0a5eSKenneth D. Merry.Op generic args 36428db0a5eSKenneth 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 36528db0a5eSKenneth D. Merry.Nm 366d455c0d0SWarner Losh.Ic devtype 367d455c0d0SWarner Losh.Op device id 368d455c0d0SWarner Losh.Nm 36953cce2e7SWarner Losh.Ic depop 37053cce2e7SWarner Losh.Op device id 37153cce2e7SWarner Losh.Op generic args 37253cce2e7SWarner Losh.Ao Fl l | Fl d | Fl r Ac 37353cce2e7SWarner Losh.Op Fl e Ar elem 37453cce2e7SWarner Losh.Op Fl c Ar capacity 37553cce2e7SWarner Losh.Nm 37633fab22eSKenneth D. Merry.Ic help 377525689f1SJustin T. Gibbs.Sh DESCRIPTION 378e1205e80SPhilippe CharnierThe 3797c7fb079SRuslan Ermilov.Nm 380e1205e80SPhilippe Charnierutility is designed to provide a way for users to access and control the 38133fab22eSKenneth D. Merry.Fx 382525689f1SJustin T. GibbsCAM subsystem. 383525689f1SJustin T. Gibbs.Pp 384e1205e80SPhilippe CharnierThe 3857c7fb079SRuslan Ermilov.Nm 386e1205e80SPhilippe Charnierutility 3879806e231SRuslan Ermilovcan cause a loss of data and/or system crashes if used improperly. 3889806e231SRuslan ErmilovEven 3899deea857SKenneth D. Merryexpert users are encouraged to exercise caution when using this command. 390525689f1SJustin T. GibbsNovice users should stay away from this utility. 391525689f1SJustin T. Gibbs.Pp 392e1205e80SPhilippe CharnierThe 3937c7fb079SRuslan Ermilov.Nm 394e1205e80SPhilippe Charnierutility has a number of primary functions, many of which support an optional 3959806e231SRuslan Ermilovdevice identifier. 3969806e231SRuslan ErmilovA device identifier can take one of three forms: 3971252c1bbSRuslan Ermilov.Bl -tag -width 14n 398c60e19a8SKenneth D. Merry.It deviceUNIT 399c60e19a8SKenneth D. MerrySpecify a device name and unit number combination, like "da5" or "cd3". 400c60e19a8SKenneth D. Merry.It bus:target 4019806e231SRuslan ErmilovSpecify a bus number and target id. 4029806e231SRuslan ErmilovThe bus number can be determined from 403c60e19a8SKenneth D. Merrythe output of 404c60e19a8SKenneth D. Merry.Dq camcontrol devlist . 405c60e19a8SKenneth D. MerryThe lun defaults to 0. 406c60e19a8SKenneth D. Merry.It bus:target:lun 4079806e231SRuslan ErmilovSpecify the bus, target and lun for a device. 4089806e231SRuslan Ermilov(e.g.\& 1:2:0) 409c60e19a8SKenneth D. Merry.El 410c60e19a8SKenneth D. Merry.Pp 411c60e19a8SKenneth D. MerryThe device identifier, if it is specified, 412c60e19a8SKenneth D. Merry.Em must 413c60e19a8SKenneth D. Merrycome immediately after the function name, and before any generic or 4149806e231SRuslan Ermilovfunction-specific arguments. 4159806e231SRuslan ErmilovNote that the 416c60e19a8SKenneth D. Merry.Fl n 417c60e19a8SKenneth D. Merryand 418c60e19a8SKenneth D. Merry.Fl u 419c60e19a8SKenneth D. Merryarguments described below will override any device name or unit number 4209806e231SRuslan Ermilovspecified beforehand. 4219806e231SRuslan ErmilovThe 422c60e19a8SKenneth D. Merry.Fl n 423c60e19a8SKenneth D. Merryand 424c60e19a8SKenneth D. Merry.Fl u 425c60e19a8SKenneth D. Merryarguments will 426c60e19a8SKenneth D. Merry.Em not 42796a93c63SKenneth D. Merryoverride a specified bus:target or bus:target:lun, however. 428c60e19a8SKenneth D. Merry.Pp 429c60e19a8SKenneth D. MerryMost of the 4307c7fb079SRuslan Ermilov.Nm 431c60e19a8SKenneth D. Merryprimary functions support these generic arguments: 4321252c1bbSRuslan Ermilov.Bl -tag -width 14n 433525689f1SJustin T. Gibbs.It Fl C Ar count 4349806e231SRuslan ErmilovSCSI command retry count. 4359806e231SRuslan ErmilovIn order for this to work, error recovery 4361252c1bbSRuslan Ermilov.Pq Fl E 437525689f1SJustin T. Gibbsmust be turned on. 438525689f1SJustin T. Gibbs.It Fl E 439525689f1SJustin T. GibbsInstruct the kernel to perform generic SCSI error recovery for the given 4409806e231SRuslan Ermilovcommand. 4419806e231SRuslan ErmilovThis is needed in order for the retry count 4421252c1bbSRuslan Ermilov.Pq Fl C 4439806e231SRuslan Ermilovto be honored. 4449806e231SRuslan ErmilovOther than retrying commands, the generic error recovery in 445525689f1SJustin T. Gibbsthe code will generally attempt to spin up drives that are not spinning. 446525689f1SJustin T. GibbsIt may take some other actions, depending upon the sense code returned from 447525689f1SJustin T. Gibbsthe command. 448525689f1SJustin T. Gibbs.It Fl n Ar dev_name 4499806e231SRuslan ErmilovSpecify the device type to operate on, e.g.\& "da", "cd". 450492a2ef5SKenneth D. Merry.It Fl Q Ar task_attr 451492a2ef5SKenneth D. Merry.Tn SCSI 452492a2ef5SKenneth D. Merrytask attribute for the command, if it is a 453492a2ef5SKenneth D. Merry.Tn SCSI 454492a2ef5SKenneth D. Merrycommand. 455492a2ef5SKenneth D. MerryThis may be ordered, simple, head, or aca. 456492a2ef5SKenneth D. MerryIn most cases this is not needed. 457492a2ef5SKenneth D. MerryThe default is simple, which works with all 458492a2ef5SKenneth D. Merry.Tn SCSI 459492a2ef5SKenneth D. Merrydevices. 460492a2ef5SKenneth D. MerryThe task attribute may also be specified numerically. 461525689f1SJustin T. Gibbs.It Fl t Ar timeout 4629806e231SRuslan ErmilovSCSI command timeout in seconds. 4639806e231SRuslan ErmilovThis overrides the default timeout for 464525689f1SJustin T. Gibbsany given command. 465525689f1SJustin T. Gibbs.It Fl u Ar unit_number 4669806e231SRuslan ErmilovSpecify the device unit number, e.g.\& "1", "5". 467525689f1SJustin T. Gibbs.It Fl v 468525689f1SJustin T. GibbsBe verbose, print out sense information for failed SCSI commands. 469525689f1SJustin T. Gibbs.El 470525689f1SJustin T. Gibbs.Pp 471d13d1cd2SKenneth D. MerryPrimary command functions: 472525689f1SJustin T. Gibbs.Bl -tag -width periphlist 47333fab22eSKenneth D. Merry.It Ic devlist 474525689f1SJustin T. GibbsList all physical devices (logical units) attached to the CAM subsystem. 475525689f1SJustin T. GibbsThis also includes a list of peripheral drivers attached to each device. 476525689f1SJustin T. GibbsWith the 477525689f1SJustin T. Gibbs.Fl v 478525689f1SJustin T. Gibbsargument, SCSI bus number, adapter name and unit numbers are printed as 479525689f1SJustin T. Gibbswell. 48056dc4e72SScott LongOn the other hand, with the 48156dc4e72SScott Long.Fl b 48256dc4e72SScott Longargument, only the bus adapter, and unit information will be printed, and 48356dc4e72SScott Longdevice information will be omitted. 48433fab22eSKenneth D. Merry.It Ic periphlist 485525689f1SJustin T. GibbsList all peripheral drivers attached to a given physical device (logical 486525689f1SJustin T. Gibbsunit). 48733fab22eSKenneth D. Merry.It Ic tur 488525689f1SJustin T. GibbsSend the SCSI test unit ready (0x00) command to the given device. 489e1205e80SPhilippe CharnierThe 4907c7fb079SRuslan Ermilov.Nm 491e1205e80SPhilippe Charnierutility will report whether the device is ready or not. 49233fab22eSKenneth D. Merry.It Ic inquiry 4939806e231SRuslan ErmilovSend a SCSI inquiry command (0x12) to a device. 4949806e231SRuslan ErmilovBy default, 4957c7fb079SRuslan Ermilov.Nm 496525689f1SJustin T. Gibbswill print out the standard inquiry data, device serial number, and 4979806e231SRuslan Ermilovtransfer rate information. 4989806e231SRuslan ErmilovThe user can specify that only certain types of 499525689f1SJustin T. Gibbsinquiry data be printed: 5001252c1bbSRuslan Ermilov.Bl -tag -width 4n 501525689f1SJustin T. Gibbs.It Fl D 502525689f1SJustin T. GibbsGet the standard inquiry data. 503525689f1SJustin T. Gibbs.It Fl S 5049806e231SRuslan ErmilovPrint out the serial number. 5059806e231SRuslan ErmilovIf this flag is the only one specified, 5067c7fb079SRuslan Ermilov.Nm 507525689f1SJustin T. Gibbswill not print out "Serial Number" before the value returned by the drive. 508525689f1SJustin T. GibbsThis is to aid in script writing. 509525689f1SJustin T. Gibbs.It Fl R 510525689f1SJustin T. GibbsPrint out transfer rate information. 511525689f1SJustin T. Gibbs.El 51252c9ce25SScott Long.It Ic identify 51352c9ce25SScott LongSend a ATA identify command (0xec) to a device. 51442cb6a80SKenneth D. Merry.It Ic reportluns 51542cb6a80SKenneth D. MerrySend the SCSI REPORT LUNS (0xA0) command to the given device. 51642cb6a80SKenneth D. MerryBy default, 51742cb6a80SKenneth D. Merry.Nm 51842cb6a80SKenneth D. Merrywill print out the list of logical units (LUNs) supported by the target device. 51942cb6a80SKenneth D. MerryThere are a couple of options to modify the output: 5208266d476SRuslan Ermilov.Bl -tag -width 14n 52142cb6a80SKenneth D. Merry.It Fl c 52242cb6a80SKenneth D. MerryJust print out a count of LUNs, not the actual LUN numbers. 52342cb6a80SKenneth D. Merry.It Fl l 524b1edef17SJoel DahlJust print out the LUNs, and do not print out the count. 52542cb6a80SKenneth D. Merry.It Fl r Ar reporttype 52642cb6a80SKenneth D. MerrySpecify the type of report to request from the target: 52742cb6a80SKenneth D. Merry.Bl -tag -width 012345678 52842cb6a80SKenneth D. Merry.It default 52942cb6a80SKenneth D. MerryReturn the default report. 53042cb6a80SKenneth D. MerryThis is the 53142cb6a80SKenneth D. Merry.Nm 53242cb6a80SKenneth D. Merrydefault. 53342cb6a80SKenneth D. MerryMost targets will support this report if they support the REPORT LUNS 53442cb6a80SKenneth D. Merrycommand. 53542cb6a80SKenneth D. Merry.It wellknown 53642cb6a80SKenneth D. MerryReturn only well known LUNs. 53742cb6a80SKenneth D. Merry.It all 53842cb6a80SKenneth D. MerryReturn all available LUNs. 53942cb6a80SKenneth D. Merry.El 54042cb6a80SKenneth D. Merry.El 54142cb6a80SKenneth D. Merry.Pp 54242cb6a80SKenneth D. Merry.Nm 54342cb6a80SKenneth D. Merrywill try to print out LUN numbers in a reasonable format. 54442cb6a80SKenneth D. MerryIt can understand the peripheral, flat, LUN and extended LUN formats. 545f553b7b3SKenneth D. Merry.It Ic readcap 546f553b7b3SKenneth D. MerrySend the SCSI READ CAPACITY command to the given device and display 547f553b7b3SKenneth D. Merrythe results. 548f553b7b3SKenneth D. MerryIf the device is larger than 2TB, the SCSI READ CAPACITY (16) service 549f553b7b3SKenneth D. Merryaction will be sent to obtain the full size of the device. 550f553b7b3SKenneth D. MerryBy default, 551f553b7b3SKenneth D. Merry.Nm 552f553b7b3SKenneth D. Merrywill print out the last logical block of the device, and the blocksize of 553f553b7b3SKenneth D. Merrythe device in bytes. 554f553b7b3SKenneth D. MerryTo modify the output format, use the following options: 555f553b7b3SKenneth D. Merry.Bl -tag -width 5n 556f553b7b3SKenneth D. Merry.It Fl b 557f553b7b3SKenneth D. MerryJust print out the blocksize, not the last block or device size. 558f553b7b3SKenneth D. MerryThis cannot be used with 559f553b7b3SKenneth D. Merry.Fl N 560f553b7b3SKenneth D. Merryor 561f553b7b3SKenneth D. Merry.Fl s . 562f553b7b3SKenneth D. Merry.It Fl h 563f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 2, 1K == 1024) format. 564f553b7b3SKenneth D. MerryThis implies 565f553b7b3SKenneth D. Merry.Fl N 566f553b7b3SKenneth D. Merryand cannot be used with 567f553b7b3SKenneth D. Merry.Fl q 568f553b7b3SKenneth D. Merryor 569f553b7b3SKenneth D. Merry.Fl b . 570f553b7b3SKenneth D. Merry.It Fl H 571f553b7b3SKenneth D. MerryPrint out the device size in human readable (base 10, 1K == 1000) format. 572b9dd559aSWarner Losh.It Fl l 573b9dd559aSWarner LoshSkip sending the SCSI READ CAPACITY (10) command. 574b9dd559aSWarner LoshSend only the SCSI READ CAPACITY (16) service action and report 575b9dd559aSWarner Loshits results. 576b9dd559aSWarner LoshWhen the two do not match, a quirk is needed to resolve the ambiguity. 577f553b7b3SKenneth D. Merry.It Fl N 578f553b7b3SKenneth D. MerryPrint out the number of blocks in the device instead of the last logical 579f553b7b3SKenneth D. Merryblock. 580f553b7b3SKenneth D. Merry.It Fl q 581f553b7b3SKenneth D. MerryQuiet, print out the numbers only (separated by a comma if 582f553b7b3SKenneth D. Merry.Fl b 583f553b7b3SKenneth D. Merryor 584f553b7b3SKenneth D. Merry.Fl s 585f553b7b3SKenneth D. Merryare not specified). 586f553b7b3SKenneth D. Merry.It Fl s 587f553b7b3SKenneth D. MerryPrint out the last logical block or the size of the device only, and omit 588f553b7b3SKenneth D. Merrythe blocksize. 589f553b7b3SKenneth D. Merry.El 590d68fae58SEdward Tomasz Napierala.Pp 591d68fae58SEdward Tomasz NapieralaNote that this command only displays the information, it does not update 592d68fae58SEdward Tomasz Napieralathe kernel data structures. 593d68fae58SEdward Tomasz NapieralaUse the 594d68fae58SEdward Tomasz Napierala.Nm 595d68fae58SEdward Tomasz Napieralareprobe subcommand to do that. 59633fab22eSKenneth D. Merry.It Ic start 597525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 598525689f1SJustin T. Gibbsstart bit set. 59933fab22eSKenneth D. Merry.It Ic stop 600525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 601525689f1SJustin T. Gibbsstart bit cleared. 602f9cecca2SMatthew N. Dodd.It Ic load 603f9cecca2SMatthew N. DoddSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 604f9cecca2SMatthew N. Doddstart bit set and the load/eject bit set. 60533fab22eSKenneth D. Merry.It Ic eject 606525689f1SJustin T. GibbsSend the SCSI Start/Stop Unit (0x1B) command to the given device with the 607f9cecca2SMatthew N. Doddstart bit cleared and the load/eject bit set. 60833fab22eSKenneth D. Merry.It Ic rescan 609db4fcadfSConrad MeyerTell the kernel to scan all buses in the system (with the 6105710d224SKenneth D. Merry.Ar all 61136d0fa44SKenneth D. Merryargument), the given bus (XPT_SCAN_BUS), bus:target:lun or device 6129806e231SRuslan Ermilov(XPT_SCAN_LUN) for new devices or devices that have gone away. 6139806e231SRuslan ErmilovThe user 614db4fcadfSConrad Meyermay specify a scan of all buses, a single bus, or a lun. 6159806e231SRuslan ErmilovScanning all luns 6160227791bSRuslan Ermilovon a target is not supported. 61736d0fa44SKenneth D. Merry.Pp 61836d0fa44SKenneth D. MerryIf a device is specified by peripheral name and unit number, for instance 61936d0fa44SKenneth D. Merryda4, it may only be rescanned if that device currently exists in the CAM EDT 62036d0fa44SKenneth D. Merry(Existing Device Table). 62136d0fa44SKenneth D. MerryIf the device is no longer there (see 62236d0fa44SKenneth D. Merry.Nm 62336d0fa44SKenneth D. Merrydevlist ), 62436d0fa44SKenneth D. Merryyou must use the bus:target:lun form to rescan it. 625d68fae58SEdward Tomasz Napierala.It Ic reprobe 626d68fae58SEdward Tomasz NapieralaTell the kernel to refresh the information about the device and 627d68fae58SEdward Tomasz Napieralanotify the upper layer, 628d68fae58SEdward Tomasz Napierala.Xr GEOM 4 . 629d68fae58SEdward Tomasz NapieralaThis includes sending the SCSI READ CAPACITY command and updating 630d68fae58SEdward Tomasz Napieralathe disk size visible to the rest of the system. 63133fab22eSKenneth D. Merry.It Ic reset 632db4fcadfSConrad MeyerTell the kernel to reset all buses in the system (with the 6335710d224SKenneth D. Merry.Ar all 63436d0fa44SKenneth D. Merryargument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus 63536d0fa44SKenneth D. Merryreset for that bus, or to reset the given bus:target:lun or device 636a2a44836SMatt Jacob(XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after 637ef8f7ac9SSheldon Hearnconnecting to that device. 638ef8f7ac9SSheldon HearnNote that this can have a destructive impact 639a2a44836SMatt Jacobon the system. 64033fab22eSKenneth D. Merry.It Ic defects 641a1736be3SKenneth D. MerrySend the 642a1736be3SKenneth D. Merry.Tn SCSI 643a1736be3SKenneth D. MerryREAD DEFECT DATA (10) command (0x37) or the 644a1736be3SKenneth D. Merry.Tn SCSI 645a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command (0xB7) to the given device, and 646525689f1SJustin T. Gibbsprint out any combination of: the total number of defects, the primary 647525689f1SJustin T. Gibbsdefect list (PLIST), and the grown defect list (GLIST). 6481252c1bbSRuslan Ermilov.Bl -tag -width 11n 649525689f1SJustin T. Gibbs.It Fl f Ar format 650a1736be3SKenneth D. MerrySpecify the requested format of the defect list. 6519806e231SRuslan ErmilovThe format argument is 6529806e231SRuslan Ermilovrequired. 6539806e231SRuslan ErmilovMost drives support the physical sector format. 6549806e231SRuslan ErmilovSome drives 6559806e231SRuslan Ermilovsupport the logical block format. 6560227791bSRuslan ErmilovMany drives, if they do not support the 657525689f1SJustin T. Gibbsrequested format, return the data in an alternate format, along with sense 6580227791bSRuslan Ermilovinformation indicating that the requested data format is not supported. 659e1205e80SPhilippe CharnierThe 6607c7fb079SRuslan Ermilov.Nm 661e1205e80SPhilippe Charnierutility 662525689f1SJustin T. Gibbsattempts to detect this, and print out whatever format the drive returns. 6630227791bSRuslan ErmilovIf the drive uses a non-standard sense code to report that it does not 664525689f1SJustin T. Gibbssupport the requested format, 6657c7fb079SRuslan Ermilov.Nm 666525689f1SJustin T. Gibbswill probably see the error as a failure to complete the request. 667a1736be3SKenneth D. Merry.Pp 668a1736be3SKenneth D. MerryThe format options are: 669a1736be3SKenneth D. Merry.Bl -tag -width 9n 670a1736be3SKenneth D. Merry.It block 671a1736be3SKenneth D. MerryPrint out the list as logical blocks. 672a1736be3SKenneth D. MerryThis is limited to 32-bit block sizes, and isn't supported by many modern 673a1736be3SKenneth D. Merrydrives. 674a1736be3SKenneth D. Merry.It longblock 675a1736be3SKenneth D. MerryPrint out the list as logical blocks. 676a1736be3SKenneth D. MerryThis option uses a 64-bit block size. 677a1736be3SKenneth D. Merry.It bfi 678a1736be3SKenneth D. MerryPrint out the list in bytes from index format. 679a1736be3SKenneth D. Merry.It extbfi 680a1736be3SKenneth D. MerryPrint out the list in extended bytes from index format. 681a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed. 682a1736be3SKenneth D. Merry.It phys 683a1736be3SKenneth D. MerryPrint out the list in physical sector format. 684a1736be3SKenneth D. MerryMost drives support this format. 685a1736be3SKenneth D. Merry.It extphys 686a1736be3SKenneth D. MerryPrint out the list in extended physical sector format. 687a1736be3SKenneth D. MerryThe extended format allows for ranges of blocks to be printed. 688a1736be3SKenneth D. Merry.El 689525689f1SJustin T. Gibbs.It Fl G 6909806e231SRuslan ErmilovPrint out the grown defect list. 6919806e231SRuslan ErmilovThis is a list of bad blocks that have 692525689f1SJustin T. Gibbsbeen remapped since the disk left the factory. 693525689f1SJustin T. Gibbs.It Fl P 694525689f1SJustin T. GibbsPrint out the primary defect list. 695a1736be3SKenneth D. MerryThis is the list of defects that were present in the factory. 696a1736be3SKenneth D. Merry.It Fl q 697a1736be3SKenneth D. MerryWhen printing status information with 698a1736be3SKenneth D. Merry.Fl s , 699a1736be3SKenneth D. Merryonly print the number of defects. 700a1736be3SKenneth D. Merry.It Fl s 701a1736be3SKenneth D. MerryJust print the number of defects, not the list of defects. 702a1736be3SKenneth D. Merry.It Fl S Ar offset 703a1736be3SKenneth D. MerrySpecify the starting offset into the defect list. 704a1736be3SKenneth D. MerryThis implies using the 705a1736be3SKenneth D. Merry.Tn SCSI 706a1736be3SKenneth D. MerryREAD DEFECT DATA (12) command, as the 10 byte version of the command 707a1736be3SKenneth D. Merrydoesn't support the address descriptor index field. 708a1736be3SKenneth D. MerryNot all drives support the 12 byte command, and some drives that support 709a1736be3SKenneth D. Merrythe 12 byte command don't support the address descriptor index field. 710a1736be3SKenneth D. Merry.It Fl X 711a1736be3SKenneth D. MerryPrint out defects in hexadecimal (base 16) form instead of base 10 form. 712525689f1SJustin T. Gibbs.El 713525689f1SJustin T. Gibbs.Pp 714525689f1SJustin T. GibbsIf neither 715525689f1SJustin T. Gibbs.Fl P 716525689f1SJustin T. Gibbsnor 717525689f1SJustin T. Gibbs.Fl G 718525689f1SJustin T. Gibbsis specified, 7197c7fb079SRuslan Ermilov.Nm 720525689f1SJustin T. Gibbswill print out the number of defects given in the READ DEFECT DATA header 721525689f1SJustin T. Gibbsreturned from the drive. 7227027b9cdSKenneth D. MerrySome drives will report 0 defects if neither the primary or grown defect 7237027b9cdSKenneth D. Merrylists are requested. 72433fab22eSKenneth D. Merry.It Ic modepage 7259806e231SRuslan ErmilovAllows the user to display and optionally edit a SCSI mode page. 7269806e231SRuslan ErmilovThe mode 727525689f1SJustin T. Gibbspage formats are located in 728525689f1SJustin T. Gibbs.Pa /usr/share/misc/scsi_modes . 729525689f1SJustin T. GibbsThis can be overridden by specifying a different file in the 730525689f1SJustin T. Gibbs.Ev SCSI_MODES 73133fab22eSKenneth D. Merryenvironment variable. 73233fab22eSKenneth D. MerryThe 73333fab22eSKenneth D. Merry.Ic modepage 73433fab22eSKenneth D. Merrycommand takes several arguments: 7351252c1bbSRuslan Ermilov.Bl -tag -width 12n 736e341cfd2SAlexander Motin.It Fl 6 737e341cfd2SAlexander MotinUse 6 byte MODE commands instead of default 10 byte. 738e341cfd2SAlexander MotinOld devices may not support 10 byte MODE commands, while new devices may 739e341cfd2SAlexander Motinnot be able to report all mode pages with 6 byte commands. 740e341cfd2SAlexander MotinIf not specified, 741e341cfd2SAlexander Motin.Nm 742e341cfd2SAlexander Motinstarts with 10 byte commands and falls back to 6 byte on error. 7439deea857SKenneth D. Merry.It Fl d 744525689f1SJustin T. GibbsDisable block descriptors for mode sense. 74509128776SAlexander Motin.It Fl D 74609128776SAlexander MotinDisplay/edit block descriptors instead of mode page. 74709128776SAlexander Motin.It Fl L 74809128776SAlexander MotinUse long LBA block descriptors. 74909128776SAlexander MotinAllows number of LBAs bigger then 2^^32. 7507e32b20dSKelly Yancey.It Fl b 7517e32b20dSKelly YanceyDisplays mode page data in binary format. 752525689f1SJustin T. Gibbs.It Fl e 7539806e231SRuslan ErmilovThis flag allows the user to edit values in the mode page. 7549806e231SRuslan ErmilovThe user may 7557e32b20dSKelly Yanceyeither edit mode page values with the text editor pointed to by his 7567e32b20dSKelly Yancey.Ev EDITOR 7577e32b20dSKelly Yanceyenvironment variable, or supply mode page values via standard input, using 7587e32b20dSKelly Yanceythe same format that 7597c7fb079SRuslan Ermilov.Nm 7609806e231SRuslan Ermilovuses to display mode page values. 7619806e231SRuslan ErmilovThe editor will be invoked if 7627c7fb079SRuslan Ermilov.Nm 7637e32b20dSKelly Yanceydetects that standard input is terminal. 7647e32b20dSKelly Yancey.It Fl l 7657e32b20dSKelly YanceyLists all available mode pages. 76654644e21SAlexander MotinIf specified more then once, also lists subpages. 76754644e21SAlexander Motin.It Fl m Ar page[,subpage] 76854644e21SAlexander MotinThis specifies the number of the mode page and optionally subpage the user 76954644e21SAlexander Motinwould like to view and/or edit. 7709806e231SRuslan ErmilovThis argument is mandatory unless 7719402dd99SKelly Yancey.Fl l 7729402dd99SKelly Yanceyis specified. 7731ac2383cSBill Fumerola.It Fl P Ar pgctl 7749806e231SRuslan ErmilovThis allows the user to specify the page control field. 7759806e231SRuslan ErmilovPossible values are: 776525689f1SJustin T. Gibbs.Bl -tag -width xxx -compact 77746a1f3b4SKenneth D. Merry.It 0 778525689f1SJustin T. GibbsCurrent values 77946a1f3b4SKenneth D. Merry.It 1 780525689f1SJustin T. GibbsChangeable values 78146a1f3b4SKenneth D. Merry.It 2 782525689f1SJustin T. GibbsDefault values 78346a1f3b4SKenneth D. Merry.It 3 784525689f1SJustin T. GibbsSaved values 785525689f1SJustin T. Gibbs.El 786525689f1SJustin T. Gibbs.El 78733fab22eSKenneth D. Merry.It Ic cmd 78880976615SAlexander MotinAllows the user to send an arbitrary ATA or SCSI CDB to any device. 78933fab22eSKenneth D. MerryThe 79033fab22eSKenneth D. Merry.Ic cmd 791525689f1SJustin T. Gibbsfunction requires the 792525689f1SJustin T. Gibbs.Fl c 79380976615SAlexander Motinargument to specify SCSI CDB or the 79480976615SAlexander Motin.Fl a 79580976615SAlexander Motinargument to specify ATA Command Block registers values. 7969806e231SRuslan ErmilovOther arguments are optional, depending on 7979806e231SRuslan Ermilovthe command type. 7989806e231SRuslan ErmilovThe command and data specification syntax is documented 799525689f1SJustin T. Gibbsin 80096a93c63SKenneth D. Merry.Xr cam_cdbparse 3 . 801a53bb70bSJoel DahlNOTE: If the CDB specified causes data to be transferred to or from the 802525689f1SJustin T. GibbsSCSI device in question, you MUST specify either 803525689f1SJustin T. Gibbs.Fl i 804525689f1SJustin T. Gibbsor 805525689f1SJustin T. Gibbs.Fl o . 8061252c1bbSRuslan Ermilov.Bl -tag -width 17n 80780976615SAlexander Motin.It Fl a Ar cmd Op args 80880976615SAlexander MotinThis specifies the content of 12 ATA Command Block registers (command, 80980976615SAlexander Motinfeatures, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp. 81080976615SAlexander Motinlba_high_exp, features_exp, sector_count, sector_count_exp). 811525689f1SJustin T. Gibbs.It Fl c Ar cmd Op args 8129806e231SRuslan ErmilovThis specifies the SCSI CDB. 81380976615SAlexander MotinSCSI CDBs may be 6, 10, 12 or 16 bytes. 814f930c0dbSAlexander Motin.It Fl d 815f930c0dbSAlexander MotinSpecifies DMA protocol to be used for ATA command. 816f930c0dbSAlexander Motin.It Fl f 817f930c0dbSAlexander MotinSpecifies FPDMA (NCQ) protocol to be used for ATA command. 818525689f1SJustin T. Gibbs.It Fl i Ar len Ar fmt 819525689f1SJustin T. GibbsThis specifies the amount of data to read, and how it should be displayed. 820525689f1SJustin T. GibbsIf the format is 821525689f1SJustin T. Gibbs.Sq - , 822525689f1SJustin T. Gibbs.Ar len 823525689f1SJustin T. Gibbsbytes of data will be read from the device and written to standard output. 824525689f1SJustin T. Gibbs.It Fl o Ar len Ar fmt Op args 825525689f1SJustin T. GibbsThis specifies the amount of data to be written to a device, and the data 8269806e231SRuslan Ermilovthat is to be written. 8279806e231SRuslan ErmilovIf the format is 828525689f1SJustin T. Gibbs.Sq - , 829525689f1SJustin T. Gibbs.Ar len 830525689f1SJustin T. Gibbsbytes of data will be read from standard input and written to the device. 83180976615SAlexander Motin.It Fl r Ar fmt 83280976615SAlexander MotinThis specifies that 11 result ATA Command Block registers should be displayed 83380976615SAlexander Motin(status, error, lba_low, lba_mid, lba_high, device, lba_low_exp, lba_mid_exp, 83480976615SAlexander Motinlba_high_exp, sector_count, sector_count_exp), and how. 83580976615SAlexander MotinIf the format is 83680976615SAlexander Motin.Sq - , 83780976615SAlexander Motin11 result registers will be written to standard output in hex. 838525689f1SJustin T. Gibbs.El 83906e79492SKenneth D. Merry.It Ic smpcmd 84006e79492SKenneth D. MerryAllows the user to send an arbitrary Serial 84106e79492SKenneth D. MerryManagement Protocol (SMP) command to a device. 84206e79492SKenneth D. MerryThe 84306e79492SKenneth D. Merry.Ic smpcmd 84406e79492SKenneth D. Merryfunction requires the 84506e79492SKenneth D. Merry.Fl r 84606e79492SKenneth D. Merryargument to specify the SMP request to be sent, and the 84706e79492SKenneth D. Merry.Fl R 84806e79492SKenneth D. Merryargument to specify the format of the SMP response. 84906e79492SKenneth D. MerryThe syntax for the SMP request and response arguments is documented in 85006e79492SKenneth D. Merry.Xr cam_cdbparse 3 . 85106e79492SKenneth D. Merry.Pp 85206e79492SKenneth D. MerryNote that SAS adapters that support SMP passthrough (at least the currently 85306e79492SKenneth D. Merryknown adapters) do not accept CRC bytes from the user in the request and do 85406e79492SKenneth D. Merrynot pass CRC bytes back to the user in the response. 85506e79492SKenneth D. MerryTherefore users should not include the CRC bytes in the length of the 85606e79492SKenneth D. Merryrequest and not expect CRC bytes to be returned in the response. 85706e79492SKenneth D. Merry.Bl -tag -width 17n 85806e79492SKenneth D. Merry.It Fl r Ar len Ar fmt Op args 85906e79492SKenneth D. MerryThis specifies the size of the SMP request, without the CRC bytes, and the 8605bb17266SJoel DahlSMP request format. 8615bb17266SJoel DahlIf the format is 86206e79492SKenneth D. Merry.Sq - , 86306e79492SKenneth D. Merry.Ar len 86406e79492SKenneth D. Merrybytes of data will be read from standard input and written as the SMP 86506e79492SKenneth D. Merryrequest. 86606e79492SKenneth D. Merry.It Fl R Ar len Ar fmt Op args 86706e79492SKenneth D. MerryThis specifies the size of the buffer allocated for the SMP response, and 86806e79492SKenneth D. Merrythe SMP response format. 86906e79492SKenneth D. MerryIf the format is 87006e79492SKenneth D. Merry.Sq - , 87106e79492SKenneth D. Merry.Ar len 87206e79492SKenneth D. Merrybytes of data will be allocated for the response and the response will be 87306e79492SKenneth D. Merrywritten to standard output. 87406e79492SKenneth D. Merry.El 87506e79492SKenneth D. Merry.It Ic smprg 87606e79492SKenneth D. MerryAllows the user to send the Serial Management Protocol (SMP) Report General 87706e79492SKenneth D. Merrycommand to a device. 87806e79492SKenneth D. Merry.Nm 87906e79492SKenneth D. Merrywill display the data returned by the Report General command. 88006e79492SKenneth D. MerryIf the SMP target supports the long response format, the additional data 88106e79492SKenneth D. Merrywill be requested and displayed automatically. 88206e79492SKenneth D. Merry.Bl -tag -width 8n 88306e79492SKenneth D. Merry.It Fl l 88406e79492SKenneth D. MerryRequest the long response format only. 88506e79492SKenneth D. MerryNot all SMP targets support the long response format. 88606e79492SKenneth D. MerryThis option causes 88706e79492SKenneth D. Merry.Nm 88806e79492SKenneth D. Merryto skip sending the initial report general request without the long bit set 88906e79492SKenneth D. Merryand only issue a report general request with the long bit set. 89006e79492SKenneth D. Merry.El 89106e79492SKenneth D. Merry.It Ic smppc 89206e79492SKenneth D. MerryAllows the user to issue the Serial Management Protocol (SMP) PHY Control 89306e79492SKenneth D. Merrycommand to a device. 89406e79492SKenneth D. MerryThis function should be used with some caution, as it can render devices 89506e79492SKenneth D. Merryinaccessible, and could potentially cause data corruption as well. 89606e79492SKenneth D. MerryThe 89706e79492SKenneth D. Merry.Fl p 89806e79492SKenneth D. Merryargument is required to specify the PHY to operate on. 89906e79492SKenneth D. Merry.Bl -tag -width 17n 90006e79492SKenneth D. Merry.It Fl p Ar phy 90106e79492SKenneth D. MerrySpecify the PHY to operate on. 90206e79492SKenneth D. MerryThis argument is required. 90306e79492SKenneth D. Merry.It Fl l 90406e79492SKenneth D. MerryRequest the long request/response format. 90506e79492SKenneth D. MerryNot all SMP targets support the long response format. 90606e79492SKenneth D. MerryFor the PHY Control command, this currently only affects whether the 90706e79492SKenneth D. Merryrequest length is set to a value other than 0. 90806e79492SKenneth D. Merry.It Fl o Ar operation 90906e79492SKenneth D. MerrySpecify a PHY control operation. 91006e79492SKenneth D. MerryOnly one 91106e79492SKenneth D. Merry.Fl o 91206e79492SKenneth D. Merryoperation may be specified. 91306e79492SKenneth D. MerryThe operation may be specified numerically (in decimal, hexadecimal, or octal) 91406e79492SKenneth D. Merryor one of the following operation names may be specified: 91506e79492SKenneth D. Merry.Bl -tag -width 16n 91606e79492SKenneth D. Merry.It nop 91706e79492SKenneth D. MerryNo operation. 91806e79492SKenneth D. MerryIt is not necessary to specify this argument. 91906e79492SKenneth D. Merry.It linkreset 92006e79492SKenneth D. MerrySend the LINK RESET command to the phy. 92106e79492SKenneth D. Merry.It hardreset 92206e79492SKenneth D. MerrySend the HARD RESET command to the phy. 92306e79492SKenneth D. Merry.It disable 92406e79492SKenneth D. MerrySend the DISABLE command to the phy. 92506e79492SKenneth D. MerryNote that the LINK RESET or HARD RESET commands should re-enable the phy. 926ee5320f4SKenneth D. Merry.It clearerrlog 92706e79492SKenneth D. MerrySend the CLEAR ERROR LOG command. 92806e79492SKenneth D. MerryThis clears the error log counters for the specified phy. 92906e79492SKenneth D. Merry.It clearaffiliation 93006e79492SKenneth D. MerrySend the CLEAR AFFILIATION command. 93106e79492SKenneth D. MerryThis clears the affiliation from the STP initiator port with the same SAS 93206e79492SKenneth D. Merryaddress as the SMP initiator that requests the clear operation. 93306e79492SKenneth D. Merry.It sataportsel 93406e79492SKenneth D. MerrySend the TRANSMIT SATA PORT SELECTION SIGNAL command to the phy. 93506e79492SKenneth D. MerryThis will cause a SATA port selector to use the given phy as its active phy 93606e79492SKenneth D. Merryand make the other phy inactive. 93706e79492SKenneth D. Merry.It clearitnl 93806e79492SKenneth D. MerrySend the CLEAR STP I_T NEXUS LOSS command to the PHY. 93906e79492SKenneth D. Merry.It setdevname 94006e79492SKenneth D. MerrySend the SET ATTACHED DEVICE NAME command to the PHY. 94106e79492SKenneth D. MerryThis requires the 94206e79492SKenneth D. Merry.Fl d 94306e79492SKenneth D. Merryargument to specify the device name. 94406e79492SKenneth D. Merry.El 94506e79492SKenneth D. Merry.It Fl d Ar name 94606e79492SKenneth D. MerrySpecify the attached device name. 94706e79492SKenneth D. MerryThis option is needed with the 94806e79492SKenneth D. Merry.Fl o Ar setdevname 94906e79492SKenneth D. Merryphy operation. 95006e79492SKenneth D. MerryThe name is a 64-bit number, and can be specified in decimal, hexadecimal 95106e79492SKenneth D. Merryor octal format. 95206e79492SKenneth D. Merry.It Fl m Ar rate 95306e79492SKenneth D. MerrySet the minimum physical link rate for the phy. 95406e79492SKenneth D. MerryThis is a numeric argument. 95506e79492SKenneth D. MerryCurrently known link rates are: 95606e79492SKenneth D. Merry.Bl -tag -width 5n 95706e79492SKenneth D. Merry.It 0x0 95806e79492SKenneth D. MerryDo not change current value. 95906e79492SKenneth D. Merry.It 0x8 96006e79492SKenneth D. Merry1.5 Gbps 96106e79492SKenneth D. Merry.It 0x9 96206e79492SKenneth D. Merry3 Gbps 96306e79492SKenneth D. Merry.It 0xa 96406e79492SKenneth D. Merry6 Gbps 96506e79492SKenneth D. Merry.El 96606e79492SKenneth D. Merry.Pp 96706e79492SKenneth D. MerryOther values may be specified for newer physical link rates. 96806e79492SKenneth D. Merry.It Fl M Ar rate 96906e79492SKenneth D. MerrySet the maximum physical link rate for the phy. 97006e79492SKenneth D. MerryThis is a numeric argument. 97106e79492SKenneth D. MerrySee the 97206e79492SKenneth D. Merry.Fl m 97306e79492SKenneth D. Merryargument description for known link rate arguments. 97406e79492SKenneth D. Merry.It Fl T Ar pp_timeout 97506e79492SKenneth D. MerrySet the partial pathway timeout value, in microseconds. 97606e79492SKenneth D. MerrySee the 97706e79492SKenneth D. Merry.Tn ANSI 97806e79492SKenneth D. Merry.Tn SAS 97919769ec2SJoel DahlProtocol Layer (SPL) 98006e79492SKenneth D. Merryspecification for more information on this field. 98106e79492SKenneth D. Merry.It Fl a Ar enable|disable 98206e79492SKenneth D. MerryEnable or disable SATA slumber phy power conditions. 98306e79492SKenneth D. Merry.It Fl A Ar enable|disable 98406e79492SKenneth D. MerryEnable or disable SATA partial power conditions. 98506e79492SKenneth D. Merry.It Fl s Ar enable|disable 98606e79492SKenneth D. MerryEnable or disable SAS slumber phy power conditions. 98706e79492SKenneth D. Merry.It Fl S Ar enable|disable 98806e79492SKenneth D. MerryEnable or disable SAS partial phy power conditions. 98906e79492SKenneth D. Merry.El 99006e79492SKenneth D. Merry.It Ic smpphylist 99106e79492SKenneth D. MerryList phys attached to a SAS expander, the address of the end device 99206e79492SKenneth D. Merryattached to the phy, and the inquiry data for that device and peripheral 99306e79492SKenneth D. Merrydevices attached to that device. 99406e79492SKenneth D. MerryThe inquiry data and peripheral devices are displayed if available. 99506e79492SKenneth D. Merry.Bl -tag -width 5n 99606e79492SKenneth D. Merry.It Fl l 99706e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for 99806e79492SKenneth D. Merrythis command. 99906e79492SKenneth D. Merry.It Fl q 100006e79492SKenneth D. MerryOnly print out phys that are attached to a device in the CAM EDT (Existing 100106e79492SKenneth D. MerryDevice Table). 100206e79492SKenneth D. Merry.El 100306e79492SKenneth D. Merry.It Ic smpmaninfo 100406e79492SKenneth D. MerrySend the SMP Report Manufacturer Information command to the device and 100506e79492SKenneth D. Merrydisplay the response. 100606e79492SKenneth D. Merry.Bl -tag -width 5n 100706e79492SKenneth D. Merry.It Fl l 100806e79492SKenneth D. MerryTurn on the long response format for the underlying SMP commands used for 100906e79492SKenneth D. Merrythis command. 101006e79492SKenneth D. Merry.El 101133fab22eSKenneth D. Merry.It Ic debug 10129806e231SRuslan ErmilovTurn on CAM debugging printfs in the kernel. 10139806e231SRuslan ErmilovThis requires options CAMDEBUG 10149806e231SRuslan Ermilovin your kernel config file. 10159806e231SRuslan ErmilovWARNING: enabling debugging printfs currently 10169806e231SRuslan Ermilovcauses an EXTREME number of kernel printfs. 10179806e231SRuslan ErmilovYou may have difficulty 1018525689f1SJustin T. Gibbsturning off the debugging printfs once they start, since the kernel will be 1019525689f1SJustin T. Gibbsbusy printing messages and unable to service other requests quickly. 102033fab22eSKenneth D. MerryThe 102133fab22eSKenneth D. Merry.Ic debug 102233fab22eSKenneth D. Merryfunction takes a number of arguments: 10231252c1bbSRuslan Ermilov.Bl -tag -width 18n 1024525689f1SJustin T. Gibbs.It Fl I 1025525689f1SJustin T. GibbsEnable CAM_DEBUG_INFO printfs. 1026a7e5261eSNate Lawson.It Fl P 1027a7e5261eSNate LawsonEnable CAM_DEBUG_PERIPH printfs. 1028525689f1SJustin T. Gibbs.It Fl T 1029525689f1SJustin T. GibbsEnable CAM_DEBUG_TRACE printfs. 1030525689f1SJustin T. Gibbs.It Fl S 1031525689f1SJustin T. GibbsEnable CAM_DEBUG_SUBTRACE printfs. 1032a7e5261eSNate Lawson.It Fl X 1033a7e5261eSNate LawsonEnable CAM_DEBUG_XPT printfs. 1034d05caa00SKenneth D. Merry.It Fl c 10359806e231SRuslan ErmilovEnable CAM_DEBUG_CDB printfs. 10369806e231SRuslan ErmilovThis will cause the kernel to print out the 1037d05caa00SKenneth D. MerrySCSI CDBs sent to the specified device(s). 1038fbfb753fSAlexander Motin.It Fl p 1039fbfb753fSAlexander MotinEnable CAM_DEBUG_PROBE printfs. 1040525689f1SJustin T. Gibbs.It all 1041525689f1SJustin T. GibbsEnable debugging for all devices. 1042525689f1SJustin T. Gibbs.It off 1043525689f1SJustin T. GibbsTurn off debugging for all devices 1044525689f1SJustin T. Gibbs.It bus Ns Op :target Ns Op :lun 10459806e231SRuslan ErmilovTurn on debugging for the given bus, target or lun. 10469806e231SRuslan ErmilovIf the lun or target 10479806e231SRuslan Ermilovand lun are not specified, they are wildcarded. 10489806e231SRuslan Ermilov(i.e., just specifying a 1049525689f1SJustin T. Gibbsbus turns on debugging printfs for all devices on that bus.) 1050525689f1SJustin T. Gibbs.El 105133fab22eSKenneth D. Merry.It Ic tags 10529deea857SKenneth D. MerryShow or set the number of "tagged openings" or simultaneous transactions 10539806e231SRuslan Ermilovwe attempt to queue to a particular device. 10549806e231SRuslan ErmilovBy default, the 105533fab22eSKenneth D. Merry.Ic tags 10569806e231SRuslan Ermilovcommand, with no command-specific arguments (i.e., only generic arguments) 10579deea857SKenneth D. Merryprints out the "soft" maximum number of transactions that can be queued to 10589806e231SRuslan Ermilovthe device in question. 10599806e231SRuslan ErmilovFor more detailed information, use the 10609deea857SKenneth D. Merry.Fl v 10619deea857SKenneth D. Merryargument described below. 10621252c1bbSRuslan Ermilov.Bl -tag -width 7n 10639deea857SKenneth D. Merry.It Fl N Ar tags 10649806e231SRuslan ErmilovSet the number of tags for the given device. 10659806e231SRuslan ErmilovThis must be between the 10669806e231SRuslan Ermilovminimum and maximum number set in the kernel quirk table. 10679806e231SRuslan ErmilovThe default for 10689deea857SKenneth D. Merrymost devices that support tagged queueing is a minimum of 2 and a maximum 10699806e231SRuslan Ermilovof 255. 10709806e231SRuslan ErmilovThe minimum and maximum values for a given device may be 10719deea857SKenneth D. Merrydetermined by using the 10729deea857SKenneth D. Merry.Fl v 10739806e231SRuslan Ermilovswitch. 10749806e231SRuslan ErmilovThe meaning of the 10759deea857SKenneth D. Merry.Fl v 10769deea857SKenneth D. Merryswitch for this 10777c7fb079SRuslan Ermilov.Nm 10789deea857SKenneth D. Merrysubcommand is described below. 10799deea857SKenneth D. Merry.It Fl q 10800227791bSRuslan ErmilovBe quiet, and do not report the number of tags. 10819806e231SRuslan ErmilovThis is generally used when 10829deea857SKenneth D. Merrysetting the number of tags. 10839deea857SKenneth D. Merry.It Fl v 10849deea857SKenneth D. MerryThe verbose flag has special functionality for the 10859deea857SKenneth D. Merry.Em tags 10869806e231SRuslan Ermilovargument. 10879806e231SRuslan ErmilovIt causes 10887c7fb079SRuslan Ermilov.Nm 10899deea857SKenneth D. Merryto print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB: 10901252c1bbSRuslan Ermilov.Bl -tag -width 13n 10919deea857SKenneth D. Merry.It dev_openings 10929deea857SKenneth D. MerryThis is the amount of capacity for transactions queued to a given device. 10939deea857SKenneth D. Merry.It dev_active 10949deea857SKenneth D. MerryThis is the number of transactions currently queued to a device. 1095d4cf7dc0SFelix Johnson.It allocated 1096d4cf7dc0SFelix JohnsonThis is the number of CCBs allocated for the device. 10979deea857SKenneth D. Merry.It held 10989deea857SKenneth D. MerryThe held count is the number of CCBs held by peripheral drivers that have 10999deea857SKenneth D. Merryeither just been completed or are about to be released to the transport 11009806e231SRuslan Ermilovlayer for service by a device. 11019806e231SRuslan ErmilovHeld CCBs reserve capacity on a given 11029deea857SKenneth D. Merrydevice. 11039deea857SKenneth D. Merry.It mintags 11049deea857SKenneth D. MerryThis is the current "hard" minimum number of transactions that can be 11059806e231SRuslan Ermilovqueued to a device at once. 11069806e231SRuslan ErmilovThe 11079deea857SKenneth D. Merry.Ar dev_openings 11089806e231SRuslan Ermilovvalue above cannot go below this number. 11099806e231SRuslan ErmilovThe default value for 11109deea857SKenneth D. Merry.Ar mintags 11119deea857SKenneth D. Merryis 2, although it may be set higher or lower for various devices. 11129deea857SKenneth D. Merry.It maxtags 11139deea857SKenneth D. MerryThis is the "hard" maximum number of transactions that can be queued to a 11149806e231SRuslan Ermilovdevice at one time. 11159806e231SRuslan ErmilovThe 11169deea857SKenneth D. Merry.Ar dev_openings 11179806e231SRuslan Ermilovvalue cannot go above this number. 11189806e231SRuslan ErmilovThe default value for 11199deea857SKenneth D. Merry.Ar maxtags 11209deea857SKenneth D. Merryis 255, although it may be set higher or lower for various devices. 11219deea857SKenneth D. Merry.El 11229deea857SKenneth D. Merry.El 112333fab22eSKenneth D. Merry.It Ic negotiate 11249806e231SRuslan ErmilovShow or negotiate various communication parameters. 11259806e231SRuslan ErmilovSome controllers may 11269806e231SRuslan Ermilovnot support setting or changing some of these values. 11279806e231SRuslan ErmilovFor instance, the 11289deea857SKenneth D. MerryAdaptec 174x controllers do not support changing a device's sync rate or 11299deea857SKenneth D. Merryoffset. 1130e1205e80SPhilippe CharnierThe 11317c7fb079SRuslan Ermilov.Nm 1132e1205e80SPhilippe Charnierutility 11339deea857SKenneth D. Merrywill not attempt to set the parameter if the controller indicates that it 11349806e231SRuslan Ermilovdoes not support setting the parameter. 11359806e231SRuslan ErmilovTo find out what the controller 11369deea857SKenneth D. Merrysupports, use the 11379deea857SKenneth D. Merry.Fl v 11389806e231SRuslan Ermilovflag. 11399806e231SRuslan ErmilovThe meaning of the 11409deea857SKenneth D. Merry.Fl v 11419deea857SKenneth D. Merryflag for the 114233fab22eSKenneth D. Merry.Ic negotiate 11439806e231SRuslan Ermilovcommand is described below. 11440227791bSRuslan ErmilovAlso, some controller drivers do not support 11459deea857SKenneth D. Merrysetting negotiation parameters, even if the underlying controller supports 11469806e231SRuslan Ermilovnegotiation changes. 11479806e231SRuslan ErmilovSome controllers, such as the Advansys wide 11489deea857SKenneth D. Merrycontrollers, support enabling and disabling synchronous negotiation for 11499deea857SKenneth D. Merrya device, but do not support setting the synchronous negotiation rate. 11501252c1bbSRuslan Ermilov.Bl -tag -width 17n 11519deea857SKenneth D. Merry.It Fl a 11529deea857SKenneth D. MerryAttempt to make the negotiation settings take effect immediately by sending 11539deea857SKenneth D. Merrya Test Unit Ready command to the device. 11549deea857SKenneth D. Merry.It Fl c 11559806e231SRuslan ErmilovShow or set current negotiation settings. 11569806e231SRuslan ErmilovThis is the default. 11579deea857SKenneth D. Merry.It Fl D Ar enable|disable 11589deea857SKenneth D. MerryEnable or disable disconnection. 1159b447e682SAlexander Motin.It Fl M Ar mode 1160b447e682SAlexander MotinSet ATA mode. 11619deea857SKenneth D. Merry.It Fl O Ar offset 11629deea857SKenneth D. MerrySet the command delay offset. 11639deea857SKenneth D. Merry.It Fl q 11640227791bSRuslan ErmilovBe quiet, do not print anything. 11659806e231SRuslan ErmilovThis is generally useful when you want to 11660227791bSRuslan Ermilovset a parameter, but do not want any status information. 11679deea857SKenneth D. Merry.It Fl R Ar syncrate 11689806e231SRuslan ErmilovChange the synchronization rate for a device. 11699806e231SRuslan ErmilovThe sync rate is a floating 11709806e231SRuslan Ermilovpoint value specified in MHz. 11719806e231SRuslan ErmilovSo, for instance, 11729deea857SKenneth D. Merry.Sq 20.000 11739deea857SKenneth D. Merryis a legal value, as is 11749deea857SKenneth D. Merry.Sq 20 . 11759deea857SKenneth D. Merry.It Fl T Ar enable|disable 11769deea857SKenneth D. MerryEnable or disable tagged queueing for a device. 11779deea857SKenneth D. Merry.It Fl U 11789806e231SRuslan ErmilovShow or set user negotiation settings. 11799806e231SRuslan ErmilovThe default is to show or set 11809deea857SKenneth D. Merrycurrent negotiation settings. 11819deea857SKenneth D. Merry.It Fl v 11829deea857SKenneth D. MerryThe verbose switch has special meaning for the 118333fab22eSKenneth D. Merry.Ic negotiate 11849806e231SRuslan Ermilovsubcommand. 11859806e231SRuslan ErmilovIt causes 11867c7fb079SRuslan Ermilov.Nm 11879deea857SKenneth D. Merryto print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the 11889deea857SKenneth D. Merrycontroller driver. 11899deea857SKenneth D. Merry.It Fl W Ar bus_width 11909806e231SRuslan ErmilovSpecify the bus width to negotiate with a device. 11919806e231SRuslan ErmilovThe bus width is 11929806e231SRuslan Ermilovspecified in bits. 11939806e231SRuslan ErmilovThe only useful values to specify are 8, 16, and 32 11949806e231SRuslan Ermilovbits. 11959806e231SRuslan ErmilovThe controller must support the bus width in question in order for 11969deea857SKenneth D. Merrythe setting to take effect. 11979deea857SKenneth D. Merry.El 11989deea857SKenneth D. Merry.Pp 11999deea857SKenneth D. MerryIn general, sync rate and offset settings will not take effect for a 12009806e231SRuslan Ermilovdevice until a command has been sent to the device. 12019806e231SRuslan ErmilovThe 12029deea857SKenneth D. Merry.Fl a 12039deea857SKenneth D. Merryswitch above will automatically send a Test Unit Ready to the device so 12049deea857SKenneth D. Merrynegotiation parameters will take effect. 120533fab22eSKenneth D. Merry.It Ic format 120696a93c63SKenneth D. MerryIssue the 120796a93c63SKenneth D. Merry.Tn SCSI 120896a93c63SKenneth D. MerryFORMAT UNIT command to the named device. 120996a93c63SKenneth D. Merry.Pp 121096a93c63SKenneth D. Merry.Em WARNING! WARNING! WARNING! 121196a93c63SKenneth D. Merry.Pp 12129806e231SRuslan ErmilovLow level formatting a disk will destroy ALL data on the disk. 12139806e231SRuslan ErmilovUse 12149806e231SRuslan Ermilovextreme caution when issuing this command. 12159806e231SRuslan ErmilovMany users low-level format 12169806e231SRuslan Ermilovdisks that do not really need to be low-level formatted. 12179806e231SRuslan ErmilovThere are 121896a93c63SKenneth D. Merryrelatively few scenarios that call for low-level formatting a disk. 121996a93c63SKenneth D. MerryOne reason for 122096a93c63SKenneth D. Merrylow-level formatting a disk is to initialize the disk after changing 12219806e231SRuslan Ermilovits physical sector size. 12229806e231SRuslan ErmilovAnother reason for low-level formatting a disk 122396a93c63SKenneth D. Merryis to revive the disk if you are getting "medium format corrupted" errors 122496a93c63SKenneth D. Merryfrom the disk in response to read and write requests. 122596a93c63SKenneth D. Merry.Pp 12269806e231SRuslan ErmilovSome disks take longer than others to format. 12279806e231SRuslan ErmilovUsers should specify a 12289806e231SRuslan Ermilovtimeout long enough to allow the format to complete. 12299806e231SRuslan ErmilovThe default format 12309806e231SRuslan Ermilovtimeout is 3 hours, which should be long enough for most disks. 12319806e231SRuslan ErmilovSome hard 123296a93c63SKenneth D. Merrydisks will complete a format operation in a very short period of time 12339806e231SRuslan Ermilov(on the order of 5 minutes or less). 12349806e231SRuslan ErmilovThis is often because the drive 12350227791bSRuslan Ermilovdoes not really support the FORMAT UNIT command -- it just accepts the 123696a93c63SKenneth D. Merrycommand, waits a few minutes and then returns it. 123796a93c63SKenneth D. Merry.Pp 123896a93c63SKenneth D. MerryThe 123996a93c63SKenneth D. Merry.Sq format 12409806e231SRuslan Ermilovsubcommand takes several arguments that modify its default behavior. 12419806e231SRuslan ErmilovThe 124296a93c63SKenneth D. Merry.Fl q 124396a93c63SKenneth D. Merryand 124496a93c63SKenneth D. Merry.Fl y 124596a93c63SKenneth D. Merryarguments can be useful for scripts. 12461252c1bbSRuslan Ermilov.Bl -tag -width 6n 124796a93c63SKenneth D. Merry.It Fl q 12480227791bSRuslan ErmilovBe quiet, do not print any status messages. 12499806e231SRuslan ErmilovThis option will not disable 12509806e231SRuslan Ermilovthe questions, however. 12519806e231SRuslan ErmilovTo disable questions, use the 125296a93c63SKenneth D. Merry.Fl y 125396a93c63SKenneth D. Merryargument, below. 1254e9e4d3e4SKenneth D. Merry.It Fl r 1255e9e4d3e4SKenneth D. MerryRun in 1256e9e4d3e4SKenneth D. Merry.Dq report only 1257e9e4d3e4SKenneth D. Merrymode. 1258e9e4d3e4SKenneth D. MerryThis will report status on a format that is already running on the drive. 125996a93c63SKenneth D. Merry.It Fl w 12609806e231SRuslan ErmilovIssue a non-immediate format command. 12619806e231SRuslan ErmilovBy default, 12627c7fb079SRuslan Ermilov.Nm 12639806e231SRuslan Ermilovissues the FORMAT UNIT command with the immediate bit set. 12649806e231SRuslan ErmilovThis tells the 126596a93c63SKenneth D. Merrydevice to immediately return the format command, before the format has 12669806e231SRuslan Ermilovactually completed. 12679806e231SRuslan ErmilovThen, 12687c7fb079SRuslan Ermilov.Nm 126996a93c63SKenneth D. Merrygathers 127096a93c63SKenneth D. Merry.Tn SCSI 127196a93c63SKenneth D. Merrysense information from the device every second to determine how far along 12729806e231SRuslan Ermilovin the format process it is. 12739806e231SRuslan ErmilovIf the 127496a93c63SKenneth D. Merry.Fl w 127596a93c63SKenneth D. Merryargument is specified, 12767c7fb079SRuslan Ermilov.Nm 127796a93c63SKenneth D. Merrywill issue a non-immediate format command, and will be unable to print any 127896a93c63SKenneth D. Merryinformation to let the user know what percentage of the disk has been 127996a93c63SKenneth D. Merryformatted. 128096a93c63SKenneth D. Merry.It Fl y 12810227791bSRuslan ErmilovDo not ask any questions. 12829806e231SRuslan ErmilovBy default, 12837c7fb079SRuslan Ermilov.Nm 128496a93c63SKenneth D. Merrywill ask the user if he/she really wants to format the disk in question, 12859806e231SRuslan Ermilovand also if the default format command timeout is acceptable. 12869806e231SRuslan ErmilovThe user 128796a93c63SKenneth D. Merrywill not be asked about the timeout if a timeout is specified on the 128896a93c63SKenneth D. Merrycommand line. 128996a93c63SKenneth D. Merry.El 1290ffead710SBryan Venteicher.It Ic sanitize 1291c15a591cSAlexander MotinIssue the SANITIZE command to the named device. 1292ffead710SBryan Venteicher.Pp 1293ffead710SBryan Venteicher.Em WARNING! WARNING! WARNING! 1294ffead710SBryan Venteicher.Pp 1295c15a591cSAlexander MotinALL data on the disk will be destroyed or made inaccessible. 1296ffead710SBryan VenteicherRecovery of the data is not possible. 1297ffead710SBryan VenteicherUse extreme caution when issuing this command. 1298ffead710SBryan Venteicher.Pp 1299ffead710SBryan VenteicherThe 1300ffead710SBryan Venteicher.Sq sanitize 1301ffead710SBryan Venteichersubcommand takes several arguments that modify its default behavior. 1302ffead710SBryan VenteicherThe 1303ffead710SBryan Venteicher.Fl q 1304ffead710SBryan Venteicherand 1305ffead710SBryan Venteicher.Fl y 1306ffead710SBryan Venteicherarguments can be useful for scripts. 1307ffead710SBryan Venteicher.Bl -tag -width 6n 1308ffead710SBryan Venteicher.It Fl a Ar operation 1309ffead710SBryan VenteicherSpecify the sanitize operation to perform. 1310ffead710SBryan Venteicher.Bl -tag -width 16n 1311ffead710SBryan Venteicher.It overwrite 1312ffead710SBryan VenteicherPerform an overwrite operation by writing a user supplied 1313ffead710SBryan Venteicherdata pattern to the device one or more times. 1314ffead710SBryan VenteicherThe pattern is given by the 1315ffead710SBryan Venteicher.Fl P 1316ffead710SBryan Venteicherargument. 1317ffead710SBryan VenteicherThe number of times is given by the 1318ffead710SBryan Venteicher.Fl c 1319ffead710SBryan Venteicherargument. 1320ffead710SBryan Venteicher.It block 1321ffead710SBryan VenteicherPerform a block erase operation. 1322ffead710SBryan VenteicherAll the device's blocks are set to a vendor defined 1323ffead710SBryan Venteichervalue, typically zero. 1324ffead710SBryan Venteicher.It crypto 1325ffead710SBryan VenteicherPerform a cryptographic erase operation. 1326ffead710SBryan VenteicherThe encryption keys are changed to prevent the decryption 1327ffead710SBryan Venteicherof the data. 1328ffead710SBryan Venteicher.It exitfailure 1329ffead710SBryan VenteicherExits a previously failed sanitize operation. 1330ffead710SBryan VenteicherA failed sanitize operation can only be exited if it was 1331ffead710SBryan Venteicherrun in the unrestricted completion mode, as provided by the 1332ffead710SBryan Venteicher.Fl U 1333ffead710SBryan Venteicherargument. 1334ffead710SBryan Venteicher.El 1335ffead710SBryan Venteicher.It Fl c Ar passes 1336ffead710SBryan VenteicherThe number of passes when performing an 1337ffead710SBryan Venteicher.Sq overwrite 1338ffead710SBryan Venteicheroperation. 13395bb17266SJoel DahlValid values are between 1 and 31. 13405bb17266SJoel DahlThe default is 1. 1341ffead710SBryan Venteicher.It Fl I 1342ffead710SBryan VenteicherWhen performing an 1343ffead710SBryan Venteicher.Sq overwrite 1344ffead710SBryan Venteicheroperation, the pattern is inverted between consecutive passes. 1345ffead710SBryan Venteicher.It Fl P Ar pattern 1346ffead710SBryan VenteicherPath to the file containing the pattern to use when 1347ffead710SBryan Venteicherperforming an 1348ffead710SBryan Venteicher.Sq overwrite 1349ffead710SBryan Venteicheroperation. 1350ffead710SBryan VenteicherThe pattern is repeated as needed to fill each block. 1351ffead710SBryan Venteicher.It Fl q 1352ffead710SBryan VenteicherBe quiet, do not print any status messages. 1353ffead710SBryan VenteicherThis option will not disable 1354ffead710SBryan Venteicherthe questions, however. 1355ffead710SBryan VenteicherTo disable questions, use the 1356ffead710SBryan Venteicher.Fl y 1357ffead710SBryan Venteicherargument, below. 1358ffead710SBryan Venteicher.It Fl U 1359ffead710SBryan VenteicherPerform the sanitize in the unrestricted completion mode. 1360ffead710SBryan VenteicherIf the operation fails, it can later be exited with the 1361ffead710SBryan Venteicher.Sq exitfailure 1362ffead710SBryan Venteicheroperation. 1363ffead710SBryan Venteicher.It Fl r 1364ffead710SBryan VenteicherRun in 1365ffead710SBryan Venteicher.Dq report only 1366ffead710SBryan Venteichermode. 1367ffead710SBryan VenteicherThis will report status on a sanitize that is already running on the drive. 1368ffead710SBryan Venteicher.It Fl w 1369ffead710SBryan VenteicherIssue a non-immediate sanitize command. 1370ffead710SBryan VenteicherBy default, 1371ffead710SBryan Venteicher.Nm 1372ffead710SBryan Venteicherissues the SANITIZE command with the immediate bit set. 1373ffead710SBryan VenteicherThis tells the 1374ffead710SBryan Venteicherdevice to immediately return the sanitize command, before 1375ffead710SBryan Venteicherthe sanitize has actually completed. 1376ffead710SBryan VenteicherThen, 1377ffead710SBryan Venteicher.Nm 1378ffead710SBryan Venteichergathers 1379ffead710SBryan Venteicher.Tn SCSI 1380ffead710SBryan Venteichersense information from the device every second to determine how far along 1381ffead710SBryan Venteicherin the sanitize process it is. 1382ffead710SBryan VenteicherIf the 1383ffead710SBryan Venteicher.Fl w 1384ffead710SBryan Venteicherargument is specified, 1385ffead710SBryan Venteicher.Nm 1386ffead710SBryan Venteicherwill issue a non-immediate sanitize command, and will be unable to print any 1387ffead710SBryan Venteicherinformation to let the user know what percentage of the disk has been 1388ffead710SBryan Venteichersanitized. 1389ffead710SBryan Venteicher.It Fl y 1390ffead710SBryan VenteicherDo not ask any questions. 1391ffead710SBryan VenteicherBy default, 1392ffead710SBryan Venteicher.Nm 1393ffead710SBryan Venteicherwill ask the user if he/she really wants to sanitize the disk in question, 1394ffead710SBryan Venteicherand also if the default sanitize command timeout is acceptable. 1395ffead710SBryan VenteicherThe user 1396ffead710SBryan Venteicherwill not be asked about the timeout if a timeout is specified on the 1397ffead710SBryan Venteichercommand line. 1398ffead710SBryan Venteicher.El 139950c9a276SAlexander Motin.It Ic idle 14005bb17266SJoel DahlPut ATA device into IDLE state. 14015bb17266SJoel DahlOptional parameter 140272166fbaSAlexander Motin.Pq Fl t 14035bb17266SJoel Dahlspecifies automatic standby timer value in seconds. 14045bb17266SJoel DahlValue 0 disables timer. 140550c9a276SAlexander Motin.It Ic standby 14065bb17266SJoel DahlPut ATA device into STANDBY state. 14075bb17266SJoel DahlOptional parameter 140872166fbaSAlexander Motin.Pq Fl t 14095bb17266SJoel Dahlspecifies automatic standby timer value in seconds. 14105bb17266SJoel DahlValue 0 disables timer. 141150c9a276SAlexander Motin.It Ic sleep 14125bb17266SJoel DahlPut ATA device into SLEEP state. 14135bb17266SJoel DahlNote that the only way get device out of 141450c9a276SAlexander Motinthis state may be reset. 14153bed0179SSteven Hartland.It Ic powermode 14163bed0179SSteven HartlandReport ATA device power mode. 1417e7affda5SAlexander Motin.It Ic apm 1418e7affda5SAlexander MotinIt optional parameter 1419e7affda5SAlexander Motin.Pq Fl l 1420e7affda5SAlexander Motinspecified, enables and sets advanced power management level, where 1421e7affda5SAlexander Motin1 -- minimum power, 127 -- maximum performance with standby, 1422e7affda5SAlexander Motin128 -- minimum power without standby, 254 -- maximum performance. 1423e7affda5SAlexander MotinIf not specified -- APM is disabled. 1424e7affda5SAlexander Motin.It Ic aam 1425e7affda5SAlexander MotinIt optional parameter 1426e7affda5SAlexander Motin.Pq Fl l 1427e7affda5SAlexander Motinspecified, enables and sets automatic acoustic management level, where 1428e7affda5SAlexander Motin1 -- minimum noise, 254 -- maximum performance. 1429e7affda5SAlexander MotinIf not specified -- AAM is disabled. 14301146874aSSteven Hartland.It Ic security 14311146874aSSteven HartlandUpdate or report security settings, using an ATA identify command (0xec). 14321146874aSSteven HartlandBy default, 14331146874aSSteven Hartland.Nm 14341146874aSSteven Hartlandwill print out the security support and associated settings of the device. 14351146874aSSteven HartlandThe 14361146874aSSteven Hartland.Ic security 14371146874aSSteven Hartlandcommand takes several arguments: 14381146874aSSteven Hartland.Bl -tag -width 0n 14391146874aSSteven Hartland.It Fl d Ar pwd 14401146874aSSteven Hartland.Pp 14411146874aSSteven HartlandDisable device security using the given password for the selected user according 14421146874aSSteven Hartlandto the devices configured security level. 14431146874aSSteven Hartland.It Fl e Ar pwd 14441146874aSSteven Hartland.Pp 14451146874aSSteven HartlandErase the device using the given password for the selected user. 14461146874aSSteven Hartland.Pp 14471146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 14481146874aSSteven Hartland.Pp 14491146874aSSteven HartlandIssuing a secure erase will 14501146874aSSteven Hartland.Em ERASE ALL 14511146874aSSteven Hartlanduser data on the device and may take several hours to complete. 14521146874aSSteven Hartland.Pp 14531146874aSSteven HartlandWhen this command is used against an SSD drive all its cells will be marked as 14545bb17266SJoel Dahlempty, restoring it to factory default write performance. 14555bb17266SJoel DahlFor SSD's this action 14561146874aSSteven Hartlandusually takes just a few seconds. 14571146874aSSteven Hartland.It Fl f 14581146874aSSteven Hartland.Pp 14591146874aSSteven HartlandFreeze the security configuration of the specified device. 14601146874aSSteven Hartland.Pp 14611146874aSSteven HartlandAfter command completion any other commands that update the device lock mode 1462e36a4a7eSJoel Dahlshall be command aborted. 1463e36a4a7eSJoel DahlFrozen mode is disabled by power-off or hardware reset. 14641146874aSSteven Hartland.It Fl h Ar pwd 14651146874aSSteven Hartland.Pp 14661146874aSSteven HartlandEnhanced erase the device using the given password for the selected user. 14671146874aSSteven Hartland.Pp 14681146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 14691146874aSSteven Hartland.Pp 14701146874aSSteven HartlandIssuing an enhanced secure erase will 14711146874aSSteven Hartland.Em ERASE ALL 14721146874aSSteven Hartlanduser data on the device and may take several hours to complete. 14731146874aSSteven Hartland.Pp 14741146874aSSteven HartlandAn enhanced erase writes predetermined data patterns to all user data areas, 14751146874aSSteven Hartlandall previously written user data shall be overwritten, including sectors that 14761146874aSSteven Hartlandare no longer in use due to reallocation. 14771146874aSSteven Hartland.It Fl k Ar pwd 14781146874aSSteven Hartland.Pp 14791146874aSSteven HartlandUnlock the device using the given password for the selected user according to 14801146874aSSteven Hartlandthe devices configured security level. 14811146874aSSteven Hartland.It Fl l Ar high|maximum 14821146874aSSteven Hartland.Pp 14831146874aSSteven HartlandSpecifies which security level to set when issuing a 14841146874aSSteven Hartland.Fl s Ar pwd 14855bb17266SJoel Dahlcommand. 14865bb17266SJoel DahlThe security level determines device behavior when the master 14875bb17266SJoel Dahlpassword is used to unlock the device. 14885bb17266SJoel DahlWhen the security level is set to high 14891146874aSSteven Hartlandthe device requires the unlock command and the master password to unlock. 14901146874aSSteven HartlandWhen the security level is set to maximum the device requires a secure erase 14911146874aSSteven Hartlandwith the master password to unlock. 14921146874aSSteven Hartland.Pp 14931146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands. 14941146874aSSteven Hartland.Pp 14951146874aSSteven HartlandDefaults to 14961146874aSSteven Hartland.Em high 14971146874aSSteven Hartland.It Fl q 14981146874aSSteven Hartland.Pp 14991146874aSSteven HartlandBe quiet, do not print any status messages. 15001146874aSSteven HartlandThis option will not disable the questions, however. 15011146874aSSteven HartlandTo disable questions, use the 15021146874aSSteven Hartland.Fl y 15031146874aSSteven Hartlandargument, below. 15041146874aSSteven Hartland.It Fl s Ar pwd 15051146874aSSteven Hartland.Pp 15061146874aSSteven HartlandPassword the device (enable security) using the given password for the selected 15075bb17266SJoel Dahluser. 15085bb17266SJoel DahlThis option can be combined with other options such as 15091146874aSSteven Hartland.Fl e Em pwd 15101146874aSSteven Hartland.Pp 151164440392SGordon BerglingA master password may be set in a addition to the user password. 151264440392SGordon BerglingThe purpose of the master password is to allow an administrator to establish 151364440392SGordon Berglinga password that is kept secret from the user, and which may be used to unlock 151464440392SGordon Berglingthe device if the user password is lost. 15151146874aSSteven Hartland.Pp 15161146874aSSteven Hartland.Em Note: 15171146874aSSteven HartlandSetting the master password does not enable device security. 15181146874aSSteven Hartland.Pp 15191146874aSSteven HartlandIf the master password is set and the drive supports a Master Revision Code 15201146874aSSteven Hartlandfeature the Master Password Revision Code will be decremented. 15211146874aSSteven Hartland.It Fl T Ar timeout 15221146874aSSteven Hartland.Pp 15231146874aSSteven HartlandOverrides the default timeout, specified in seconds, used for both 15241146874aSSteven Hartland.Fl e 15251146874aSSteven Hartlandand 15261146874aSSteven Hartland.Fl h 15271146874aSSteven Hartlandthis is useful if your system has problems processing long timeouts correctly. 15281146874aSSteven Hartland.Pp 15291146874aSSteven HartlandUsually the timeout is calculated from the information stored on the drive if 15301146874aSSteven Hartlandpresent, otherwise it defaults to 2 hours. 15311146874aSSteven Hartland.It Fl U Ar user|master 15321146874aSSteven Hartland.Pp 15331146874aSSteven HartlandSpecifies which user to set / use for the running action command, valid values 15341146874aSSteven Hartlandare user or master and defaults to master if not set. 15351146874aSSteven Hartland.Pp 15361146874aSSteven HartlandThis option must be used in conjunction with one of the security action commands. 15371146874aSSteven Hartland.Pp 15381146874aSSteven HartlandDefaults to 15391146874aSSteven Hartland.Em master 15401146874aSSteven Hartland.It Fl y 15411146874aSSteven Hartland.Pp 15421146874aSSteven HartlandConfirm yes to dangerous options such as 15431146874aSSteven Hartland.Fl e 15441146874aSSteven Hartlandwithout prompting for confirmation. 15451146874aSSteven Hartland.El 1546f636caf1SJoel Dahl.Pp 15475bb17266SJoel DahlIf the password specified for any action commands does not match the configured 15481146874aSSteven Hartlandpassword for the specified user the command will fail. 15491146874aSSteven Hartland.Pp 15501146874aSSteven HartlandThe password in all cases is limited to 32 characters, longer passwords will 15511146874aSSteven Hartlandfail. 15529e68761cSSteven Hartland.It Ic hpa 15539e68761cSSteven HartlandUpdate or report Host Protected Area details. 15549e68761cSSteven HartlandBy default 15559e68761cSSteven Hartland.Nm 15569e68761cSSteven Hartlandwill print out the HPA support and associated settings of the device. 15579e68761cSSteven HartlandThe 15589e68761cSSteven Hartland.Ic hpa 15599e68761cSSteven Hartlandcommand takes several optional arguments: 15609e68761cSSteven Hartland.Bl -tag -width 0n 15619e68761cSSteven Hartland.It Fl f 15629e68761cSSteven Hartland.Pp 15639e68761cSSteven HartlandFreeze the HPA configuration of the specified device. 15649e68761cSSteven Hartland.Pp 15659e68761cSSteven HartlandAfter command completion any other commands that update the HPA configuration 15669e68761cSSteven Hartlandshall be command aborted. 15679e68761cSSteven HartlandFrozen mode is disabled by power-off or hardware reset. 15689e68761cSSteven Hartland.It Fl l 15699e68761cSSteven Hartland.Pp 15709e68761cSSteven HartlandLock the HPA configuration of the device until a successful call to unlock or 15719e68761cSSteven Hartlandthe next power-on reset occurs. 15729e68761cSSteven Hartland.It Fl P 15739e68761cSSteven Hartland.Pp 15749e68761cSSteven HartlandMake the HPA max sectors persist across power-on reset or a hardware reset. 15759e68761cSSteven HartlandThis must be used in combination with 15769e68761cSSteven Hartland.Fl s Ar max_sectors 15779e68761cSSteven Hartland. 15789e68761cSSteven Hartland.It Fl p Ar pwd 15799e68761cSSteven Hartland.Pp 15809e68761cSSteven HartlandSet the HPA configuration password required for unlock calls. 15819e68761cSSteven Hartland.It Fl q 15829e68761cSSteven Hartland.Pp 15839e68761cSSteven HartlandBe quiet, do not print any status messages. 15849e68761cSSteven HartlandThis option will not disable the questions. 15859e68761cSSteven HartlandTo disable questions, use the 15869e68761cSSteven Hartland.Fl y 15879e68761cSSteven Hartlandargument, below. 15889e68761cSSteven Hartland.It Fl s Ar max_sectors 15899e68761cSSteven Hartland.Pp 15909e68761cSSteven HartlandConfigures the maximum user accessible sectors of the device. 15919e68761cSSteven HartlandThis will change the number of sectors the device reports. 15929e68761cSSteven Hartland.Pp 15939e68761cSSteven Hartland.Em WARNING! WARNING! WARNING! 15949e68761cSSteven Hartland.Pp 15959e68761cSSteven HartlandChanging the max sectors of a device using this option will make the data on 15969e68761cSSteven Hartlandthe device beyond the specified value inaccessible. 15979e68761cSSteven Hartland.Pp 15989e68761cSSteven HartlandOnly one successful 15999e68761cSSteven Hartland.Fl s Ar max_sectors 16009e68761cSSteven Hartlandcall can be made without a power-on reset or a hardware reset of the device. 16019e68761cSSteven Hartland.It Fl U Ar pwd 16029e68761cSSteven Hartland.Pp 16039e68761cSSteven HartlandUnlock the HPA configuration of the specified device using the given password. 16045bb17266SJoel DahlIf the password specified does not match the password configured via 16059e68761cSSteven Hartland.Fl p Ar pwd 16069e68761cSSteven Hartlandthe command will fail. 16079e68761cSSteven Hartland.Pp 16089e68761cSSteven HartlandAfter 5 failed unlock calls, due to password miss-match, the device will refuse 16099e68761cSSteven Hartlandadditional unlock calls until after a power-on reset. 16109e68761cSSteven Hartland.It Fl y 16119e68761cSSteven Hartland.Pp 16129e68761cSSteven HartlandConfirm yes to dangerous options such as 16139e68761cSSteven Hartland.Fl e 16149e68761cSSteven Hartlandwithout prompting for confirmation 16159e68761cSSteven Hartland.El 1616f636caf1SJoel Dahl.Pp 16179e68761cSSteven HartlandThe password for all HPA commands is limited to 32 characters, longer passwords 16189e68761cSSteven Hartlandwill fail. 161989b35a52SAlexander Motin.It Ic ama 162089b35a52SAlexander MotinUpdate or report Accessible Max Address Configuration. 162189b35a52SAlexander MotinBy default 162289b35a52SAlexander Motin.Nm 162389b35a52SAlexander Motinwill print out the Accessible Max Address Configuration support and associated 162489b35a52SAlexander Motinsettings of the device. 162589b35a52SAlexander MotinThe 162689b35a52SAlexander Motin.Ic ama 162789b35a52SAlexander Motincommand takes several optional arguments: 162889b35a52SAlexander Motin.Bl -tag -width 0n 162989b35a52SAlexander Motin.It Fl f 163089b35a52SAlexander Motin.Pp 163189b35a52SAlexander MotinFreeze the Accessible Max Address Configuration of the specified device. 163289b35a52SAlexander Motin.Pp 163389b35a52SAlexander MotinAfter command completion any other commands that update the configuration 163489b35a52SAlexander Motinshall be command aborted. 163589b35a52SAlexander MotinFrozen mode is disabled by power-off. 163689b35a52SAlexander Motin.It Fl q 163789b35a52SAlexander Motin.Pp 163889b35a52SAlexander MotinBe quiet, do not print any status messages. 163989b35a52SAlexander Motin.It Fl s Ar max_sectors 164089b35a52SAlexander Motin.Pp 164189b35a52SAlexander MotinConfigures the maximum user accessible sectors of the device. 164289b35a52SAlexander MotinThis will change the number of sectors the device reports. 164389b35a52SAlexander Motin.Pp 164489b35a52SAlexander Motin.Em WARNING! WARNING! WARNING! 164589b35a52SAlexander Motin.Pp 164689b35a52SAlexander MotinChanging the max sectors of a device using this option will make the data on 164789b35a52SAlexander Motinthe device beyond the specified value indeterminate. 164889b35a52SAlexander Motin.Pp 164989b35a52SAlexander MotinOnly one successful 165089b35a52SAlexander Motin.Fl s Ar max_sectors 165189b35a52SAlexander Motincall can be made without a power-on reset of the device. 165289b35a52SAlexander Motin.El 16531f4782a4SEd Maste.It Ic fwdownload 16540e358df0SKenneth D. MerryProgram firmware of the named 16550e358df0SKenneth D. Merry.Tn SCSI 16560e358df0SKenneth D. Merryor ATA device using the image file provided. 16571f4782a4SEd Maste.Pp 16580e358df0SKenneth D. MerryIf the device is a 16590e358df0SKenneth D. Merry.Tn SCSI 16600e358df0SKenneth D. Merrydevice and it provides a recommended timeout for the WRITE BUFFER command 16610e358df0SKenneth D. Merry(see the 16620e358df0SKenneth D. Merry.Nm 16630e358df0SKenneth D. Merryopcodes subcommand), that timeout will be used for the firmware download. 16640e358df0SKenneth D. MerryThe drive-recommended timeout value may be overridden on the command line 16650e358df0SKenneth D. Merrywith the 16660e358df0SKenneth D. Merry.Fl t 16670e358df0SKenneth D. Merryoption. 16680e358df0SKenneth D. Merry.Pp 16690e358df0SKenneth D. MerryCurrent list of supported vendors for SCSI/SAS drives: 16700e358df0SKenneth D. Merry.Bl -tag -width 10n 16710e358df0SKenneth D. Merry.It HGST 16720e358df0SKenneth D. MerryTested with 4TB SAS drives, model number HUS724040ALS640. 16730e358df0SKenneth D. Merry.It HITACHI 16740e358df0SKenneth D. Merry.It HP 16750e358df0SKenneth D. Merry.It IBM 16760e358df0SKenneth D. MerryTested with LTO-5 (ULTRIUM-HH5) and LTO-6 (ULTRIUM-HH6) tape drives. 16770e358df0SKenneth D. MerryThere is a separate table entry for hard drives, because the update method 16780e358df0SKenneth D. Merryfor hard drives is different than the method for tape drives. 16790e358df0SKenneth D. Merry.It PLEXTOR 16800e358df0SKenneth D. Merry.It QUALSTAR 16810e358df0SKenneth D. Merry.It QUANTUM 16820e358df0SKenneth D. Merry.It SAMSUNG 16830e358df0SKenneth D. MerryTested with SM1625 SSDs. 16840e358df0SKenneth D. Merry.It SEAGATE 16850e358df0SKenneth D. MerryTested with Constellation ES (ST32000444SS), ES.2 (ST33000651SS) and 16860e358df0SKenneth D. MerryES.3 (ST1000NM0023) drives. 16870e358df0SKenneth D. Merry.It SmrtStor 16880e358df0SKenneth D. MerryTested with 400GB Optimus SSDs (TXA2D20400GA6001). 16891f4782a4SEd Maste.El 16901f4782a4SEd Maste.Pp 16911f4782a4SEd Maste.Em WARNING! WARNING! WARNING! 16921f4782a4SEd Maste.Pp 16931f4782a4SEd MasteLittle testing has been done to make sure that different device models from 16941f4782a4SEd Masteeach vendor work correctly with the fwdownload command. 16951f4782a4SEd MasteA vendor name appearing in the supported list means only that firmware of at 16961f4782a4SEd Masteleast one device type from that vendor has successfully been programmed with 16971f4782a4SEd Mastethe fwdownload command. 16981f4782a4SEd MasteExtra caution should be taken when using this command since there is no 16991f4782a4SEd Masteguarantee it will not break a device from the listed vendors. 17001f4782a4SEd MasteEnsure that you have a recent backup of the data on the device before 17011f4782a4SEd Masteperforming a firmware update. 17020e358df0SKenneth D. Merry.Pp 17030e358df0SKenneth D. MerryNote that unknown 17040e358df0SKenneth D. Merry.Tn SCSI 17050e358df0SKenneth D. Merryprotocol devices will not be programmed, since there is little chance of 17060e358df0SKenneth D. Merrythe firmware download succeeding. 17070e358df0SKenneth D. Merry.Pp 17080e358df0SKenneth D. Merry.Nm 17090e358df0SKenneth D. Merrywill currently attempt a firmware download to any 17100e358df0SKenneth D. Merry.Tn ATA 17110e358df0SKenneth D. Merryor 17120e358df0SKenneth D. Merry.Tn SATA 17130e358df0SKenneth D. Merrydevice, since the standard 17140e358df0SKenneth D. Merry.Tn ATA 17150e358df0SKenneth D. MerryDOWNLOAD MICROCODE command may work. 17160e358df0SKenneth D. MerryFirmware downloads to 17170e358df0SKenneth D. Merry.Tn ATA 17180e358df0SKenneth D. Merryand 17190e358df0SKenneth D. Merry.Tn SATA 17200e358df0SKenneth D. Merrydevices are supported for devices connected 17210e358df0SKenneth D. Merryto standard 17220e358df0SKenneth D. Merry.Tn ATA 17230e358df0SKenneth D. Merryand 17240e358df0SKenneth D. Merry.Tn SATA 17250e358df0SKenneth D. Merrycontrollers, and devices connected to SAS controllers 17260e358df0SKenneth D. Merrywith 17270e358df0SKenneth D. Merry.Tn SCSI 17280e358df0SKenneth D. Merryto 17290e358df0SKenneth D. Merry.Tn ATA 17300e358df0SKenneth D. Merrytranslation capability. 17310e358df0SKenneth D. MerryIn the latter case, 17320e358df0SKenneth D. Merry.Nm 17330e358df0SKenneth D. Merryuses the 17340e358df0SKenneth D. Merry.Tn SCSI 17350e358df0SKenneth D. Merry.Tn ATA 17360e358df0SKenneth D. MerryPASS-THROUGH command to send the 17370e358df0SKenneth D. Merry.Tn ATA 17380e358df0SKenneth D. MerryDOWNLOAD MICROCODE command to the drive. 17390e358df0SKenneth D. MerrySome 17400e358df0SKenneth D. Merry.Tn SCSI 17410e358df0SKenneth D. Merryto 17420e358df0SKenneth D. Merry.Tn ATA 17430e358df0SKenneth D. Merrytranslation implementations don't work fully when translating 17440e358df0SKenneth D. Merry.Tn SCSI 17450e358df0SKenneth D. MerryWRITE BUFFER commands to 17460e358df0SKenneth D. Merry.Tn ATA 17470e358df0SKenneth D. MerryDOWNLOAD MICROCODE commands, but do support 17480e358df0SKenneth D. Merry.Tn ATA 17490e358df0SKenneth D. Merrypassthrough well enough to do a firmware download. 17501f4782a4SEd Maste.Bl -tag -width 11n 17511f4782a4SEd Maste.It Fl f Ar fw_image 17521f4782a4SEd MastePath to the firmware image file to be downloaded to the specified device. 17530e358df0SKenneth D. Merry.It Fl q 17540e358df0SKenneth D. MerryDo not print informational messages, only print errors. 17550e358df0SKenneth D. MerryThis option should be used with the 17560e358df0SKenneth D. Merry.Fl y 17570e358df0SKenneth D. Merryoption to suppress all output. 17581f4782a4SEd Maste.It Fl s 17591f4782a4SEd MasteRun in simulation mode. 17600e358df0SKenneth D. MerryDevice checks are run and the confirmation dialog is shown, but no firmware 17610e358df0SKenneth D. Merrydownload will occur. 17621f4782a4SEd Maste.It Fl v 17630e358df0SKenneth D. MerryShow 17640e358df0SKenneth D. Merry.Tn SCSI 17650e358df0SKenneth D. Merryor 17660e358df0SKenneth D. Merry.Tn ATA 17670e358df0SKenneth D. Merryerrors in the event of a failure. 17680e358df0SKenneth D. Merry.Pp 17690e358df0SKenneth D. MerryIn simulation mode, print out the 17700e358df0SKenneth D. Merry.Tn SCSI 17710e358df0SKenneth D. MerryCDB 17720e358df0SKenneth D. Merryor 17730e358df0SKenneth D. Merry.Tn ATA 17740e358df0SKenneth D. Merryregister values that would be used for the firmware download command. 17750e358df0SKenneth D. Merry.It Fl y 17760e358df0SKenneth D. MerryDo not ask for confirmation. 17771f4782a4SEd Maste.El 177808df2e3eSKenneth D. Merry.It Ic persist 177908df2e3eSKenneth D. MerryPersistent reservation support. 178008df2e3eSKenneth D. MerryPersistent reservations are a way to reserve a particular 178108df2e3eSKenneth D. Merry.Tn SCSI 178208df2e3eSKenneth D. MerryLUN for use by one or more 178308df2e3eSKenneth D. Merry.Tn SCSI 178408df2e3eSKenneth D. Merryinitiators. 178508df2e3eSKenneth D. MerryIf the 178608df2e3eSKenneth D. Merry.Fl i 178708df2e3eSKenneth D. Merryoption is specified, 178808df2e3eSKenneth D. Merry.Nm 178908df2e3eSKenneth D. Merrywill issue the 179008df2e3eSKenneth D. Merry.Tn SCSI 179108df2e3eSKenneth D. MerryPERSISTENT RESERVE IN 179208df2e3eSKenneth D. Merrycommand using the requested service action. 179308df2e3eSKenneth D. MerryIf the 179408df2e3eSKenneth D. Merry.Fl o 179508df2e3eSKenneth D. Merryoption is specified, 179608df2e3eSKenneth D. Merry.Nm 179708df2e3eSKenneth D. Merrywill issue the 179808df2e3eSKenneth D. Merry.Tn SCSI 179908df2e3eSKenneth D. MerryPERSISTENT RESERVE OUT 180008df2e3eSKenneth D. Merrycommand using the requested service action. 180108df2e3eSKenneth D. MerryOne of those two options is required. 180208df2e3eSKenneth D. Merry.Pp 180308df2e3eSKenneth D. MerryPersistent reservations are complex, and fully explaining them is outside 180408df2e3eSKenneth D. Merrythe scope of this manual. 180508df2e3eSKenneth D. MerryPlease visit 1806*c918f50fSWolfram Schneiderhttps://www.t10.org 180708df2e3eSKenneth D. Merryand download the latest SPC spec for a full explanation of persistent 180808df2e3eSKenneth D. Merryreservations. 180908df2e3eSKenneth D. Merry.Bl -tag -width 8n 181008df2e3eSKenneth D. Merry.It Fl i Ar mode 181108df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE IN command. 181208df2e3eSKenneth D. MerrySupported service actions: 181308df2e3eSKenneth D. Merry.Bl -tag -width 19n 181408df2e3eSKenneth D. Merry.It read_keys 181508df2e3eSKenneth D. MerryReport the current persistent reservation generation (PRgeneration) and any 181608df2e3eSKenneth D. Merryregistered keys. 181708df2e3eSKenneth D. Merry.It read_reservation 181808df2e3eSKenneth D. MerryReport the persistent reservation, if any. 181908df2e3eSKenneth D. Merry.It report_capabilities 182008df2e3eSKenneth D. MerryReport the persistent reservation capabilities of the LUN. 182108df2e3eSKenneth D. Merry.It read_full_status 182208df2e3eSKenneth D. MerryReport the full status of persistent reservations on the LUN. 182308df2e3eSKenneth D. Merry.El 182408df2e3eSKenneth D. Merry.It Fl o Ar mode 182508df2e3eSKenneth D. MerrySpecify the service action for the PERSISTENT RESERVE OUT command. 182608df2e3eSKenneth D. MerryFor service actions like register that are components of other service 182708df2e3eSKenneth D. Merryaction names, the entire name must be specified. 182808df2e3eSKenneth D. MerryOtherwise, enough of the service action name must be specified to 182908df2e3eSKenneth D. Merrydistinguish it from other possible service actions. 183008df2e3eSKenneth D. MerrySupported service actions: 183108df2e3eSKenneth D. Merry.Bl -tag -width 15n 183208df2e3eSKenneth D. Merry.It register 183308df2e3eSKenneth D. MerryRegister a reservation key with the LUN or unregister a reservation key. 183408df2e3eSKenneth D. MerryTo register a key, specify the requested key as the Service Action 183508df2e3eSKenneth D. MerryReservation Key. 183608df2e3eSKenneth D. MerryTo unregister a key, specify the previously registered key as the 183708df2e3eSKenneth D. MerryReservation Key. 183808df2e3eSKenneth D. MerryTo change a key, specify the old key as the Reservation Key and the new 183908df2e3eSKenneth D. Merrykey as the Service Action Reservation Key. 184008df2e3eSKenneth D. Merry.It register_ignore 184108df2e3eSKenneth D. MerryThis is similar to the register subcommand, except that the Reservation Key 184208df2e3eSKenneth D. Merryis ignored. 184308df2e3eSKenneth D. MerryThe Service Action Reservation Key will overwrite any previous key 184408df2e3eSKenneth D. Merryregistered for the initiator. 184508df2e3eSKenneth D. Merry.It reserve 184608df2e3eSKenneth D. MerryCreate a reservation. 184708df2e3eSKenneth D. MerryA key must be registered with the LUN before the LUN can be reserved, and 184808df2e3eSKenneth D. Merryit must be specified as the Reservation Key. 184908df2e3eSKenneth D. MerryThe type of reservation must also be specified. 185008df2e3eSKenneth D. MerryThe scope defaults to LUN scope (LU_SCOPE), but may be changed. 185108df2e3eSKenneth D. Merry.It release 185208df2e3eSKenneth D. MerryRelease a reservation. 185308df2e3eSKenneth D. MerryThe Reservation Key must be specified. 185408df2e3eSKenneth D. Merry.It clear 185508df2e3eSKenneth D. MerryRelease a reservation and remove all keys from the device. 185608df2e3eSKenneth D. MerryThe Reservation Key must be specified. 185708df2e3eSKenneth D. Merry.It preempt 185808df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator. 185908df2e3eSKenneth D. MerryThe Reservation Key must be specified. 186008df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the 186108df2e3eSKenneth D. Merryoperation being performed. 186208df2e3eSKenneth D. Merry.It preempt_abort 186308df2e3eSKenneth D. MerryRemove a reservation belonging to another initiator and abort all 186408df2e3eSKenneth D. Merryoutstanding commands from that initiator. 186508df2e3eSKenneth D. MerryThe Reservation Key must be specified. 186608df2e3eSKenneth D. MerryThe Service Action Reservation Key may be specified, depending on the 186708df2e3eSKenneth D. Merryoperation being performed. 186808df2e3eSKenneth D. Merry.It register_move 186908df2e3eSKenneth D. MerryRegister another initiator with the LUN, and establish a reservation on the 187008df2e3eSKenneth D. MerryLUN for that initiator. 187108df2e3eSKenneth D. MerryThe Reservation Key and Service Action Reservation Key must be specified. 187208df2e3eSKenneth D. Merry.It replace_lost 187308df2e3eSKenneth D. MerryReplace Lost Reservation information. 187408df2e3eSKenneth D. Merry.El 187508df2e3eSKenneth D. Merry.It Fl a 187608df2e3eSKenneth D. MerrySet the All Target Ports (ALL_TG_PT) bit. 187708df2e3eSKenneth D. MerryThis requests that the key registration be applied to all target ports and 187808df2e3eSKenneth D. Merrynot just the particular target port that receives the command. 187908df2e3eSKenneth D. MerryThis only applies to the register and register_ignore actions. 188008df2e3eSKenneth D. Merry.It Fl I Ar tid 188108df2e3eSKenneth D. MerrySpecify a Transport ID. 188208df2e3eSKenneth D. MerryThis only applies to the Register and Register and Move service actions for 188308df2e3eSKenneth D. MerryPersistent Reserve Out. 188408df2e3eSKenneth D. MerryMultiple Transport IDs may be specified with multiple 188508df2e3eSKenneth D. Merry.Fl I 188608df2e3eSKenneth D. Merryarguments. 188708df2e3eSKenneth D. MerryWith the Register service action, specifying one or more Transport IDs 188808df2e3eSKenneth D. Merryimplicitly enables the 188908df2e3eSKenneth D. Merry.Fl S 189008df2e3eSKenneth D. Merryoption which turns on the SPEC_I_PT bit. 189108df2e3eSKenneth D. MerryTransport IDs generally have the format protocol,id. 189208df2e3eSKenneth D. Merry.Bl -tag -width 5n 189308df2e3eSKenneth D. Merry.It SAS 189408df2e3eSKenneth D. MerryA SAS Transport ID consists of 189508df2e3eSKenneth D. Merry.Dq sas, 189608df2e3eSKenneth D. Merryfollowed by a 64-bit SAS address. 189708df2e3eSKenneth D. MerryFor example: 189808df2e3eSKenneth D. Merry.Pp 189908df2e3eSKenneth D. Merry.Dl sas,0x1234567812345678 190008df2e3eSKenneth D. Merry.It FC 190108df2e3eSKenneth D. MerryA Fibre Channel Transport ID consists of 190208df2e3eSKenneth D. Merry.Dq fcp, 190308df2e3eSKenneth D. Merryfollowed by a 64-bit Fibre Channel World Wide Name. 190408df2e3eSKenneth D. MerryFor example: 190508df2e3eSKenneth D. Merry.Pp 190608df2e3eSKenneth D. Merry.Dl fcp,0x1234567812345678 190708df2e3eSKenneth D. Merry.It SPI 190808df2e3eSKenneth D. MerryA Parallel SCSI address consists of 190908df2e3eSKenneth D. Merry.Dq spi, 191008df2e3eSKenneth D. Merryfollowed by a SCSI target ID and a relative target port identifier. 191108df2e3eSKenneth D. MerryFor example: 191208df2e3eSKenneth D. Merry.Pp 191308df2e3eSKenneth D. Merry.Dl spi,4,1 191408df2e3eSKenneth D. Merry.It 1394 191508df2e3eSKenneth D. MerryAn IEEE 1394 (Firewire) Transport ID consists of 191608df2e3eSKenneth D. Merry.Dq sbp, 191708df2e3eSKenneth D. Merryfollowed by a 64-bit EUI-64 IEEE 1394 node unique identifier. 191808df2e3eSKenneth D. MerryFor example: 191908df2e3eSKenneth D. Merry.Pp 192008df2e3eSKenneth D. Merry.Dl sbp,0x1234567812345678 192108df2e3eSKenneth D. Merry.It RDMA 192208df2e3eSKenneth D. MerryA SCSI over RDMA Transport ID consists of 192308df2e3eSKenneth D. Merry.Dq srp, 192408df2e3eSKenneth D. Merryfollowed by a 128-bit RDMA initiator port identifier. 192508df2e3eSKenneth D. MerryThe port identifier must be exactly 32 or 34 (if the leading 0x is 192608df2e3eSKenneth D. Merryincluded) hexadecimal digits. 192708df2e3eSKenneth D. MerryOnly hexadecimal (base 16) numbers are supported. 192808df2e3eSKenneth D. MerryFor example: 192908df2e3eSKenneth D. Merry.Pp 193008df2e3eSKenneth D. Merry.Dl srp,0x12345678123456781234567812345678 193108df2e3eSKenneth D. Merry.It iSCSI 193208df2e3eSKenneth D. MerryAn iSCSI Transport ID consists an iSCSI name and optionally a separator and 193308df2e3eSKenneth D. MerryiSCSI session ID. 193408df2e3eSKenneth D. MerryFor example, if only the iSCSI name is specified: 193508df2e3eSKenneth D. Merry.Pp 193608df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0 193708df2e3eSKenneth D. Merry.Pp 193808df2e3eSKenneth D. MerryIf the iSCSI separator and initiator session ID are specified: 193908df2e3eSKenneth D. Merry.Pp 194008df2e3eSKenneth D. Merry.Dl iqn.2012-06.com.example:target0,i,0x123 194108df2e3eSKenneth D. Merry.It PCIe 194208df2e3eSKenneth D. MerryA SCSI over PCIe Transport ID consists of 194308df2e3eSKenneth D. Merry.Dq sop, 194408df2e3eSKenneth D. Merryfollowed by a PCIe Routing ID. 194508df2e3eSKenneth D. MerryThe Routing ID consists of a bus, device and function or in the alternate 194608df2e3eSKenneth D. Merryform, a bus and function. 194708df2e3eSKenneth D. MerryThe bus must be in the range of 0 to 255 inclusive and the device must be 194808df2e3eSKenneth D. Merryin the range of 0 to 31 inclusive. 194908df2e3eSKenneth D. MerryThe function must be in the range of 0 to 7 inclusive if the standard form 195008df2e3eSKenneth D. Merryis used, and in the range of 0 to 255 inclusive if the alternate form is 195108df2e3eSKenneth D. Merryused. 195208df2e3eSKenneth D. MerryFor example, if a bus, device and function are specified for the standard 195308df2e3eSKenneth D. MerryRouting ID form: 195408df2e3eSKenneth D. Merry.Pp 195508df2e3eSKenneth D. Merry.Dl sop,4,5,1 195608df2e3eSKenneth D. Merry.Pp 195708df2e3eSKenneth D. MerryIf the alternate Routing ID form is used: 195808df2e3eSKenneth D. Merry.Pp 195908df2e3eSKenneth D. Merry.Dl sop,4,1 196008df2e3eSKenneth D. Merry.El 196108df2e3eSKenneth D. Merry.It Fl k Ar key 196208df2e3eSKenneth D. MerrySpecify the Reservation Key. 196308df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format. 196408df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified. 196508df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive. 196608df2e3eSKenneth D. Merry.It Fl K Ar key 196708df2e3eSKenneth D. MerrySpecify the Service Action Reservation Key. 196808df2e3eSKenneth D. MerryThis may be in decimal, octal or hexadecimal format. 196908df2e3eSKenneth D. MerryThe value is zero by default if not otherwise specified. 197008df2e3eSKenneth D. MerryThe value must be between 0 and 2^64 - 1, inclusive. 197108df2e3eSKenneth D. Merry.It Fl p 197208df2e3eSKenneth D. MerryEnable the Activate Persist Through Power Loss bit. 197308df2e3eSKenneth D. MerryThis is only used for the register and register_ignore actions. 197408df2e3eSKenneth D. MerryThis requests that the reservation persist across power loss events. 197508df2e3eSKenneth D. Merry.It Fl s Ar scope 197608df2e3eSKenneth D. MerrySpecify the scope of the reservation. 197708df2e3eSKenneth D. MerryThe scope may be specified by name or by number. 197808df2e3eSKenneth D. MerryThe scope is ignored for register, register_ignore and clear. 197908df2e3eSKenneth D. MerryIf the desired scope isn't available by name, you may specify the number. 198008df2e3eSKenneth D. Merry.Bl -tag -width 7n 198108df2e3eSKenneth D. Merry.It lun 198208df2e3eSKenneth D. MerryLUN scope (0x00). 198308df2e3eSKenneth D. MerryThis encompasses the entire LUN. 198408df2e3eSKenneth D. Merry.It extent 198508df2e3eSKenneth D. MerryExtent scope (0x01). 198608df2e3eSKenneth D. Merry.It element 198708df2e3eSKenneth D. MerryElement scope (0x02). 198808df2e3eSKenneth D. Merry.El 198908df2e3eSKenneth D. Merry.It Fl R Ar rtp 199008df2e3eSKenneth D. MerrySpecify the Relative Target Port. 199108df2e3eSKenneth D. MerryThis only applies to the Register and Move service action of the Persistent 199208df2e3eSKenneth D. MerryReserve Out command. 199308df2e3eSKenneth D. Merry.It Fl S 199408df2e3eSKenneth D. MerryEnable the SPEC_I_PT bit. 199508df2e3eSKenneth D. MerryThis only applies to the Register service action of Persistent Reserve Out. 199608df2e3eSKenneth D. MerryYou must also specify at least one Transport ID with 199708df2e3eSKenneth D. Merry.Fl I 199808df2e3eSKenneth D. Merryif this option is set. 199908df2e3eSKenneth D. MerryIf you specify a Transport ID, this option is automatically set. 200008df2e3eSKenneth D. MerryIt is an error to specify this option for any service action other than 200108df2e3eSKenneth D. MerryRegister. 200208df2e3eSKenneth D. Merry.It Fl T Ar type 200308df2e3eSKenneth D. MerrySpecify the reservation type. 200408df2e3eSKenneth D. MerryThe reservation type may be specified by name or by number. 200508df2e3eSKenneth D. MerryIf the desired reservation type isn't available by name, you may specify 200608df2e3eSKenneth D. Merrythe number. 200708df2e3eSKenneth D. MerrySupported reservation type names: 200808df2e3eSKenneth D. Merry.Bl -tag -width 11n 200908df2e3eSKenneth D. Merry.It read_shared 201008df2e3eSKenneth D. MerryRead Shared mode. 201108df2e3eSKenneth D. Merry.It wr_ex 201208df2e3eSKenneth D. MerryWrite Exclusive mode. 201308df2e3eSKenneth D. MerryMay also be specified as 201408df2e3eSKenneth D. Merry.Dq write_exclusive . 201508df2e3eSKenneth D. Merry.It rd_ex 201608df2e3eSKenneth D. MerryRead Exclusive mode. 201708df2e3eSKenneth D. MerryMay also be specified as 201808df2e3eSKenneth D. Merry.Dq read_exclusive . 201908df2e3eSKenneth D. Merry.It ex_ac 202008df2e3eSKenneth D. MerryExclusive access mode. 202108df2e3eSKenneth D. MerryMay also be specified as 202208df2e3eSKenneth D. Merry.Dq exclusive_access . 202308df2e3eSKenneth D. Merry.It wr_ex_ro 202408df2e3eSKenneth D. MerryWrite Exclusive Registrants Only mode. 202508df2e3eSKenneth D. MerryMay also be specified as 202608df2e3eSKenneth D. Merry.Dq write_exclusive_reg_only . 202708df2e3eSKenneth D. Merry.It ex_ac_ro 202808df2e3eSKenneth D. MerryExclusive Access Registrants Only mode. 202908df2e3eSKenneth D. MerryMay also be specified as 203008df2e3eSKenneth D. Merry.Dq exclusive_access_reg_only . 203108df2e3eSKenneth D. Merry.It wr_ex_ar 203208df2e3eSKenneth D. MerryWrite Exclusive All Registrants mode. 203308df2e3eSKenneth D. MerryMay also be specified as 203408df2e3eSKenneth D. Merry.Dq write_exclusive_all_regs . 203508df2e3eSKenneth D. Merry.It ex_ac_ar 203608df2e3eSKenneth D. MerryExclusive Access All Registrants mode. 203708df2e3eSKenneth D. MerryMay also be specified as 203808df2e3eSKenneth D. Merry.Dq exclusive_access_all_regs . 203908df2e3eSKenneth D. Merry.El 204008df2e3eSKenneth D. Merry.It Fl U 204108df2e3eSKenneth D. MerrySpecify that the target should unregister the initiator that sent 204208df2e3eSKenneth D. Merrythe Register and Move request. 204308df2e3eSKenneth D. MerryBy default, the target will not unregister the initiator that sends the 204408df2e3eSKenneth D. MerryRegister and Move request. 204508df2e3eSKenneth D. MerryThis option only applies to the Register and Move service action of the 204608df2e3eSKenneth D. MerryPersistent Reserve Out command. 204708df2e3eSKenneth D. Merry.El 20485672fac9SKenneth D. Merry.It Ic attrib 20495672fac9SKenneth D. MerryIssue the 20505672fac9SKenneth D. Merry.Tn SCSI 20515672fac9SKenneth D. MerryREAD or WRITE ATTRIBUTE commands. 20525672fac9SKenneth D. MerryThese commands are used to read and write attributes in Medium Auxiliary 20535672fac9SKenneth D. MerryMemory (MAM). 20545672fac9SKenneth D. MerryThe most common place Medium Auxiliary Memory is found is small flash chips 20555672fac9SKenneth D. Merryincluded tape cartriges. 20565672fac9SKenneth D. MerryFor instance, 20575672fac9SKenneth D. Merry.Tn LTO 20585672fac9SKenneth D. Merrytapes have MAM. 20595672fac9SKenneth D. MerryEither the 20605672fac9SKenneth D. Merry.Fl r 20615672fac9SKenneth D. Merryoption or the 20625672fac9SKenneth D. Merry.Fl w 20635672fac9SKenneth D. Merryoption must be specified. 20645672fac9SKenneth D. Merry.Bl -tag -width 14n 20655672fac9SKenneth D. Merry.It Fl r Ar action 20665672fac9SKenneth D. MerrySpecify the READ ATTRIBUTE service action. 20675672fac9SKenneth D. Merry.Bl -tag -width 11n 20685672fac9SKenneth D. Merry.It attr_values 20695672fac9SKenneth D. MerryIssue the ATTRIBUTE VALUES service action. 20705672fac9SKenneth D. MerryRead and decode the available attributes and their values. 20715672fac9SKenneth D. Merry.It attr_list 20725672fac9SKenneth D. MerryIssue the ATTRIBUTE LIST service action. 20735672fac9SKenneth D. MerryList the attributes that are available to read and write. 20745672fac9SKenneth D. Merry.It lv_list 20755672fac9SKenneth D. MerryIssue the LOGICAL VOLUME LIST service action. 20765672fac9SKenneth D. MerryList the available logical volumes in the MAM. 20775672fac9SKenneth D. Merry.It part_list 20785672fac9SKenneth D. MerryIssue the PARTITION LIST service action. 20795672fac9SKenneth D. MerryList the available partitions in the MAM. 20805672fac9SKenneth D. Merry.It supp_attr 20815672fac9SKenneth D. MerryIssue the SUPPORTED ATTRIBUTES service action. 20825672fac9SKenneth D. MerryList attributes that are supported for reading or writing. 20835672fac9SKenneth D. MerryThese attributes may or may not be currently present in the MAM. 20845672fac9SKenneth D. Merry.El 20855672fac9SKenneth D. Merry.It Fl w Ar attr 20865672fac9SKenneth D. MerrySpecify an attribute to write to the MAM. 20875672fac9SKenneth D. MerryThis option is not yet implemented. 20885672fac9SKenneth D. Merry.It Fl a Ar num 20895672fac9SKenneth D. MerrySpecify the attribute number to display. 20905672fac9SKenneth D. MerryThis option only works with the attr_values, attr_list and supp_attr 20915672fac9SKenneth D. Merryarguments to 20925672fac9SKenneth D. Merry.Fl r . 20935672fac9SKenneth D. Merry.It Fl c 20945672fac9SKenneth D. MerryDisplay cached attributes. 20955672fac9SKenneth D. MerryIf the device supports this flag, it allows displaying attributes for the 20965672fac9SKenneth D. Merrylast piece of media loaded in the drive. 20975672fac9SKenneth D. Merry.It Fl e Ar num 20985672fac9SKenneth D. MerrySpecify the element address. 20995672fac9SKenneth D. MerryThis is used for specifying which element number in a medium changer to 21005672fac9SKenneth D. Merryaccess when reading attributes. 21015672fac9SKenneth D. MerryThe element number could be for a picker, portal, slot or drive. 21025672fac9SKenneth D. Merry.It Fl F Ar form1,form2 21035672fac9SKenneth D. MerrySpecify the output format for the attribute values (attr_val) display as a 21045672fac9SKenneth D. Merrycomma separated list of options. 21055672fac9SKenneth D. MerryThe default output is currently set to field_all,nonascii_trim,text_raw. 21065672fac9SKenneth D. MerryOnce this code is ported to FreeBSD 10, any text fields will be converted 21075672fac9SKenneth D. Merryfrom their codeset to the user's native codeset with 21085672fac9SKenneth D. Merry.Xr iconv 3 . 21095672fac9SKenneth D. Merry.Pp 21105672fac9SKenneth D. MerryThe text options are mutually exclusive; if you specify more than one, you 21115672fac9SKenneth D. Merrywill get unpredictable results. 21125672fac9SKenneth D. MerryThe nonascii options are also mutually exclusive. 21135672fac9SKenneth D. MerryMost of the field options may be logically ORed together. 21145672fac9SKenneth D. Merry.Bl -tag -width 12n 21155672fac9SKenneth D. Merry.It text_esc 21165672fac9SKenneth D. MerryPrint text fields with non-ASCII characters escaped. 21175672fac9SKenneth D. Merry.It text_raw 21185672fac9SKenneth D. MerryPrint text fields natively, with no codeset conversion. 21195672fac9SKenneth D. Merry.It nonascii_esc 21205672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21215672fac9SKenneth D. Merryescape the non-ASCII characters. 21225672fac9SKenneth D. Merry.It nonascii_trim 21235672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21245672fac9SKenneth D. Merryomit the non-ASCII characters. 21255672fac9SKenneth D. Merry.It nonascii_raw 21265672fac9SKenneth D. MerryIf any non-ASCII characters occur in fields that are supposed to be ASCII, 21275672fac9SKenneth D. Merryprint them as they are. 21285672fac9SKenneth D. Merry.It field_all 21295672fac9SKenneth D. MerryPrint all of the prefix fields: description, attribute number, attribute 21305672fac9SKenneth D. Merrysize, and the attribute's readonly status. 21315672fac9SKenneth D. MerryIf field_all is specified, specifying any other field options will not have 21325672fac9SKenneth D. Merryan effect. 21335672fac9SKenneth D. Merry.It field_none 21345672fac9SKenneth D. MerryPrint none of the prefix fields, and only print out the attribute value. 21355672fac9SKenneth D. MerryIf field_none is specified, specifying any other field options will result 21365672fac9SKenneth D. Merryin those fields being printed. 21375672fac9SKenneth D. Merry.It field_desc 21385672fac9SKenneth D. MerryPrint out the attribute description. 21395672fac9SKenneth D. Merry.It field_num 21405672fac9SKenneth D. MerryPrint out the attribute number. 21415672fac9SKenneth D. Merry.It field_size 21425672fac9SKenneth D. MerryPrint out the attribute size. 21435672fac9SKenneth D. Merry.It field_rw 21445672fac9SKenneth D. MerryPrint out the attribute's readonly status. 21455672fac9SKenneth D. Merry.El 21465672fac9SKenneth D. Merry.It Fl p Ar part 21475672fac9SKenneth D. MerrySpecify the partition. 21485672fac9SKenneth D. MerryWhen the media has multiple partitions, specifying different partition 21495672fac9SKenneth D. Merrynumbers allows seeing the values for each individual partition. 21505672fac9SKenneth D. Merry.It Fl s Ar start_num 21515672fac9SKenneth D. MerrySpecify the starting attribute number. 21525672fac9SKenneth D. MerryThis requests that the target device return attribute information starting 21535672fac9SKenneth D. Merryat the given number. 21545672fac9SKenneth D. Merry.It Fl T Ar elem_type 21555672fac9SKenneth D. MerrySpecify the element type. 21565672fac9SKenneth D. MerryFor medium changer devices, this allows specifying the type the element 21575672fac9SKenneth D. Merryreferenced in the element address ( 21585672fac9SKenneth D. Merry.Fl e ) . 21595672fac9SKenneth D. MerryValid types are: 21605672fac9SKenneth D. Merry.Dq all , 21615672fac9SKenneth D. Merry.Dq picker , 21625672fac9SKenneth D. Merry.Dq slot , 21635672fac9SKenneth D. Merry.Dq portal , 21645672fac9SKenneth D. Merryand 21655672fac9SKenneth D. Merry.Dq drive . 21665672fac9SKenneth D. Merry.It Fl V Ar vol_num 21675672fac9SKenneth D. MerrySpecify the number of the logical volume to operate on. 21685672fac9SKenneth D. MerryIf the media has multiple logical volumes, this will allow displaying 21695672fac9SKenneth D. Merryor writing attributes on the given logical volume. 21709a6844d5SKenneth D. Merry.El 21710e358df0SKenneth D. Merry.It Ic opcodes 21720e358df0SKenneth D. MerryIssue the REPORT SUPPORTED OPCODES service action of the 21730e358df0SKenneth D. Merry.Tn SCSI 21740e358df0SKenneth D. MerryMAINTENANCE IN 21750e358df0SKenneth D. Merrycommand. 21760e358df0SKenneth D. MerryWithout arguments, this command will return a list of all 21770e358df0SKenneth D. Merry.Tn SCSI 21780e358df0SKenneth D. Merrycommands supported by the device, including service actions of commands 21790e358df0SKenneth D. Merrythat support service actions. 21800e358df0SKenneth D. MerryIt will also include the 21810e358df0SKenneth D. Merry.Tn SCSI 21820e358df0SKenneth D. MerryCDB (Command Data Block) length for each command, and the description of 21830e358df0SKenneth D. Merryeach command if it is known. 21840e358df0SKenneth D. Merry.Bl -tag -width 18n 21850e358df0SKenneth D. Merry.It Fl o Ar opcode 21860e358df0SKenneth D. MerryRequest information on a specific opcode instead of the list of supported 21870e358df0SKenneth D. Merrycommands. 21880e358df0SKenneth D. MerryIf supported, the target will return a CDB-like structure that indicates 21890e358df0SKenneth D. Merrythe opcode, service action (if any), and a mask of bits that are supported 21900e358df0SKenneth D. Merryin that CDB. 21910e358df0SKenneth D. Merry.It Fl s Ar service_action 21920e358df0SKenneth D. MerryFor commands that support a service action, specify the service action to 21930e358df0SKenneth D. Merryquery. 21940e358df0SKenneth D. Merry.It Fl N 21950e358df0SKenneth D. MerryIf a service action is specified for a given opcode, and the device does 21960e358df0SKenneth D. Merrynot support the given service action, the device should not return a 21970e358df0SKenneth D. Merry.Tn SCSI 21980e358df0SKenneth D. Merryerror, but rather indicate in the returned parameter data that the command 21990e358df0SKenneth D. Merryis not supported. 22000e358df0SKenneth D. MerryBy default, if a service action is specified for an opcode, and service 22010e358df0SKenneth D. Merryactions are not supported for the opcode in question, the device will 22020e358df0SKenneth D. Merryreturn an error. 22030e358df0SKenneth D. Merry.It Fl T 22040e358df0SKenneth D. MerryInclude timeout values. 22050e358df0SKenneth D. MerryThis option works with the default display, which includes all commands 22060e358df0SKenneth D. Merrysupported by the device, and with the 22070e358df0SKenneth D. Merry.Fl o 22080e358df0SKenneth D. Merryand 22090e358df0SKenneth D. Merry.Fl s 22100e358df0SKenneth D. Merryoptions, which request information on a specific command and service 22110e358df0SKenneth D. Merryaction. 22120e358df0SKenneth D. MerryThis requests that the device report Nominal and Recommended timeout values 22130e358df0SKenneth D. Merryfor the given command or commands. 22140e358df0SKenneth D. MerryThe timeout values are in seconds. 22150e358df0SKenneth D. MerryThe timeout descriptor also includes a command-specific 22160e358df0SKenneth D. Merry.El 22179a6844d5SKenneth D. Merry.It Ic zone 22189a6844d5SKenneth D. MerryManage 22199a6844d5SKenneth D. Merry.Tn SCSI 22209a6844d5SKenneth D. Merryand 22219a6844d5SKenneth D. Merry.Tn ATA 22229a6844d5SKenneth D. MerryZoned Block devices. 22239a6844d5SKenneth D. MerryThis allows managing devices that conform to the 22249a6844d5SKenneth D. Merry.Tn SCSI 22259a6844d5SKenneth D. MerryZoned Block Commands (ZBC) and 22269a6844d5SKenneth D. Merry.Tn ATA 22279a6844d5SKenneth D. MerryZoned ATA Command Set (ZAC) 22289a6844d5SKenneth D. Merryspecifications. 22299a6844d5SKenneth D. MerryDevices using these command sets are usually hard drives using Shingled 22309a6844d5SKenneth D. MerryMagnetic Recording (SMR). 22319a6844d5SKenneth D. MerryThere are three types of SMR drives: 22329a6844d5SKenneth D. Merry.Bl -tag -width 13n 22339a6844d5SKenneth D. Merry.It Drive Managed 22349a6844d5SKenneth D. MerryDrive Managed drives look and act just like a standard random access block 22359a6844d5SKenneth D. Merrydevice, but underneath, the drive reads and writes the bulk of its capacity 22369a6844d5SKenneth D. Merryusing SMR zones. 22379a6844d5SKenneth D. MerrySequential writes will yield better performance, but writing sequentially 22389a6844d5SKenneth D. Merryis not required. 22399a6844d5SKenneth D. Merry.It Host Aware 22409a6844d5SKenneth D. MerryHost Aware drives expose the underlying zone layout via 22419a6844d5SKenneth D. Merry.Tn SCSI 22429a6844d5SKenneth D. Merryor 22439a6844d5SKenneth D. Merry.Tn ATA 22449a6844d5SKenneth D. Merrycommands and allow the host to manage the zone conditions. 22459a6844d5SKenneth D. MerryThe host is not required to manage the zones on the drive, though. 22469a6844d5SKenneth D. MerrySequential writes will yield better performance in Sequential Write 22479a6844d5SKenneth D. MerryPreferred zones, but the host can write randomly in those zones. 22489a6844d5SKenneth D. Merry.It Host Managed 22499a6844d5SKenneth D. MerryHost Managed drives expose the underlying zone layout via 22509a6844d5SKenneth D. Merry.Tn SCSI 22519a6844d5SKenneth D. Merryor 22529a6844d5SKenneth D. Merry.Tn ATA 22539a6844d5SKenneth D. Merrycommands. 22549a6844d5SKenneth D. MerryThe host is required to access the zones according to the rules described 22559a6844d5SKenneth D. Merryby the zone layout. 22569a6844d5SKenneth D. MerryAny commands that violate the rules will be returned with an error. 22579a6844d5SKenneth D. Merry.El 22589a6844d5SKenneth D. Merry.Pp 22599a6844d5SKenneth D. MerrySMR drives are divided into zones (typically in the range of 256MB each) 22609a6844d5SKenneth D. Merrythat fall into three general categories: 22619a6844d5SKenneth D. Merry.Bl -tag -width 20n 22629a6844d5SKenneth D. Merry.It Conventional 22639a6844d5SKenneth D. MerryThese are also known as Non Write Pointer zones. 22649a6844d5SKenneth D. MerryThese zones can be randomly written without an unexpected performance penalty. 22659a6844d5SKenneth D. Merry.It Sequential Preferred 22669a6844d5SKenneth D. MerryThese zones should be written sequentially starting at the write pointer 22679a6844d5SKenneth D. Merryfor the zone. 22689a6844d5SKenneth D. MerryThey may be written randomly. 22699a6844d5SKenneth D. MerryWrites that do not conform to the zone layout may be significantly slower 22709a6844d5SKenneth D. Merrythan expected. 22719a6844d5SKenneth D. Merry.It Sequential Required 22729a6844d5SKenneth D. MerryThese zones must be written sequentially. 22739a6844d5SKenneth D. MerryIf they are not written sequentially, starting at the write pointer, the 22749a6844d5SKenneth D. Merrycommand will fail. 22759a6844d5SKenneth D. Merry.El 22769a6844d5SKenneth D. Merry.Bl -tag -width 12n 22779a6844d5SKenneth D. Merry.It Fl c Ar cmd 22789a6844d5SKenneth D. MerrySpecify the zone subcommand: 22799a6844d5SKenneth D. Merry.Bl -tag -width 6n 22809a6844d5SKenneth D. Merry.It rz 22819a6844d5SKenneth D. MerryIssue the Report Zones command. 22829a6844d5SKenneth D. MerryAll zones are returned by default. 22839a6844d5SKenneth D. MerrySpecify report options with 22849a6844d5SKenneth D. Merry.Fl o 22859a6844d5SKenneth D. Merryand printing options with 22869a6844d5SKenneth D. Merry.Fl P . 22879a6844d5SKenneth D. MerrySpecify the starting LBA with 22889a6844d5SKenneth D. Merry.Fl l . 22899a6844d5SKenneth D. MerryNote that 22909a6844d5SKenneth D. Merry.Dq reportzones 22919a6844d5SKenneth D. Merryis also accepted as a command argument. 22929a6844d5SKenneth D. Merry.It open 22939a6844d5SKenneth D. MerryExplicitly open the zone specified by the starting LBA. 22949a6844d5SKenneth D. Merry.It close 22959a6844d5SKenneth D. MerryClose the zone specified by starting LBA. 22969a6844d5SKenneth D. Merry.It finish 22979a6844d5SKenneth D. MerryFinish the zone specified by the starting LBA. 22989a6844d5SKenneth D. Merry.It rwp 22999a6844d5SKenneth D. MerryReset the write pointer for the zone specified by the starting LBA. 23009a6844d5SKenneth D. Merry.El 23019a6844d5SKenneth D. Merry.It Fl a 23029a6844d5SKenneth D. MerryFor the Open, Close, Finish, and Reset Write Pointer operations, apply the 23039a6844d5SKenneth D. Merryoperation to all zones on the drive. 23049a6844d5SKenneth D. Merry.It Fl l Ar lba 23059a6844d5SKenneth D. MerrySpecify the starting LBA. 23069a6844d5SKenneth D. MerryFor the Report Zones command, this tells the drive to report starting with 23079a6844d5SKenneth D. Merrythe zone that starts at the given LBA. 23089a6844d5SKenneth D. MerryFor the other commands, this allows the user to identify the zone requested 23099a6844d5SKenneth D. Merryby its starting LBA. 23109a6844d5SKenneth D. MerryThe LBA may be specified in decimal, hexadecimal or octal notation. 23119a6844d5SKenneth D. Merry.It Fl o Ar rep_opt 23129a6844d5SKenneth D. MerryFor the Report Zones command, specify a subset of zones to report. 23139a6844d5SKenneth D. Merry.Bl -tag -width 8n 23149a6844d5SKenneth D. Merry.It all 23159a6844d5SKenneth D. MerryReport all zones. 23169a6844d5SKenneth D. MerryThis is the default. 23179a6844d5SKenneth D. Merry.It emtpy 23189a6844d5SKenneth D. MerryReport only empty zones. 23199a6844d5SKenneth D. Merry.It imp_open 23209a6844d5SKenneth D. MerryReport zones that are implicitly open. 23219a6844d5SKenneth D. MerryThis means that the host has sent a write to the zone without explicitly 23229a6844d5SKenneth D. Merryopening the zone. 23239a6844d5SKenneth D. Merry.It exp_open 23249a6844d5SKenneth D. MerryReport zones that are explicitly open. 23259a6844d5SKenneth D. Merry.It closed 23269a6844d5SKenneth D. MerryReport zones that have been closed by the host. 23279a6844d5SKenneth D. Merry.It full 23289a6844d5SKenneth D. MerryReport zones that are full. 23299a6844d5SKenneth D. Merry.It ro 23309a6844d5SKenneth D. MerryReport zones that are in the read only state. 23319a6844d5SKenneth D. MerryNote that 23329a6844d5SKenneth D. Merry.Dq readonly 23339a6844d5SKenneth D. Merryis also accepted as an argument. 23349a6844d5SKenneth D. Merry.It offline 23359a6844d5SKenneth D. MerryReport zones that are in the offline state. 23369a6844d5SKenneth D. Merry.It reset 23379a6844d5SKenneth D. MerryReport zones where the device recommends resetting write pointers. 23389a6844d5SKenneth D. Merry.It nonseq 23399a6844d5SKenneth D. MerryReport zones that have the Non Sequential Resources Active flag set. 23409a6844d5SKenneth D. MerryThese are zones that are Sequential Write Preferred, but have been written 23419a6844d5SKenneth D. Merrynon-sequentially. 23429a6844d5SKenneth D. Merry.It nonwp 23439a6844d5SKenneth D. MerryReport Non Write Pointer zones, also known as Conventional zones. 23449a6844d5SKenneth D. Merry.El 23459a6844d5SKenneth D. Merry.It Fl P Ar print_opt 23469a6844d5SKenneth D. MerrySpecify a printing option for Report Zones: 23479a6844d5SKenneth D. Merry.Bl -tag -width 7n 23489a6844d5SKenneth D. Merry.It normal 23499a6844d5SKenneth D. MerryNormal Report Zones output. 23509a6844d5SKenneth D. MerryThis is the default. 23519a6844d5SKenneth D. MerryThe summary and column headings are printed, fields are separated by spaces 23529a6844d5SKenneth D. Merryand the fields themselves may contain spaces. 23539a6844d5SKenneth D. Merry.It summary 23549a6844d5SKenneth D. MerryJust print the summary: the number of zones, the maximum LBA (LBA of the 23559a6844d5SKenneth D. Merrylast logical block on the drive), and the value of the 23569a6844d5SKenneth D. Merry.Dq same 23579a6844d5SKenneth D. Merryfield. 23589a6844d5SKenneth D. MerryThe 23599a6844d5SKenneth D. Merry.Dq same 23609a6844d5SKenneth D. Merryfield describes whether the zones on the drive are all identical, all 23619a6844d5SKenneth D. Merrydifferent, or whether they are the same except for the last zone, etc. 23629a6844d5SKenneth D. Merry.It script 23639a6844d5SKenneth D. MerryPrint the zones in a script friendly format. 23649a6844d5SKenneth D. MerryThe summary and column headings are omitted, the fields are separated by 23659a6844d5SKenneth D. Merrycommas, and the fields do not contain spaces. 23669a6844d5SKenneth D. MerryThe fields contain underscores where spaces would normally be used. 23679a6844d5SKenneth D. Merry.El 23689a6844d5SKenneth D. Merry.El 23699a6844d5SKenneth D. Merry.It Ic epc 23709a6844d5SKenneth D. MerryIssue 23719a6844d5SKenneth D. Merry.Tn ATA 23729a6844d5SKenneth D. MerryExtended Power Conditions (EPC) feature set commands. 23739a6844d5SKenneth D. MerryThis only works on 23749a6844d5SKenneth D. Merry.Tn ATA 23759a6844d5SKenneth D. Merryprotocol drives, and will not work on 23769a6844d5SKenneth D. Merry.Tn SCSI 23779a6844d5SKenneth D. Merryprotocol drives. 23789a6844d5SKenneth D. MerryIt will work on 23799a6844d5SKenneth D. Merry.Tn SATA 23809a6844d5SKenneth D. Merrydrives behind a 23819a6844d5SKenneth D. Merry.Tn SCSI 23829a6844d5SKenneth D. Merryto 23839a6844d5SKenneth D. Merry.Tn ATA 23849a6844d5SKenneth D. Merrytranslation layer (SAT). 23859a6844d5SKenneth D. MerryIt may be helpful to read the ATA Command Set - 4 (ACS-4) description of 23869a6844d5SKenneth D. Merrythe Extended Power Conditions feature set, available at t13.org, to 23879a6844d5SKenneth D. Merryunderstand the details of this particular 23889a6844d5SKenneth D. Merry.Nm 23899a6844d5SKenneth D. Merrysubcommand. 23909a6844d5SKenneth D. Merry.Bl -tag -width 6n 23919a6844d5SKenneth D. Merry.It Fl c Ar cmd 23929a6844d5SKenneth D. MerrySpecify the epc subcommand 23939a6844d5SKenneth D. Merry.Bl -tag -width 7n 23949a6844d5SKenneth D. Merry.It restore 23959a6844d5SKenneth D. MerryRestore drive power condition settings. 23969a6844d5SKenneth D. Merry.Bl -tag -width 6n 23979a6844d5SKenneth D. Merry.It Fl r Ar src 23989a6844d5SKenneth D. MerrySpecify the source for the restored power settings, either 23999a6844d5SKenneth D. Merry.Dq default 24009a6844d5SKenneth D. Merryor 24019a6844d5SKenneth D. Merry.Dq saved . 24029a6844d5SKenneth D. MerryThis argument is required. 24039a6844d5SKenneth D. Merry.It Fl s 24049a6844d5SKenneth D. MerrySave the settings. 24059a6844d5SKenneth D. MerryThis only makes sense to specify when restoring from defaults. 24069a6844d5SKenneth D. Merry.El 24079a6844d5SKenneth D. Merry.It goto 24089a6844d5SKenneth D. MerryGo to the specified power condition. 24099a6844d5SKenneth D. Merry.Bl -tag -width 7n 24109a6844d5SKenneth D. Merry.It Fl p Ar cond 24119a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24129a6844d5SKenneth D. MerryThis argument is required. 24139a6844d5SKenneth D. Merry.It Fl D 24149a6844d5SKenneth D. MerrySpecify delayed entry to the power condition. 24159a6844d5SKenneth D. MerryThe drive, if it supports this, can enter the power condition after the 24169a6844d5SKenneth D. Merrycommand completes. 24179a6844d5SKenneth D. Merry.It Fl H 24189a6844d5SKenneth D. MerryHold the power condition. 24199a6844d5SKenneth D. MerryIf the drive supports this option, it will hold the power condition and 24209a6844d5SKenneth D. Merryreject all commands that would normally cause it to exit that power 24219a6844d5SKenneth D. Merrycondition. 24229a6844d5SKenneth D. Merry.El 24239a6844d5SKenneth D. Merry.It timer 24249a6844d5SKenneth D. MerrySet the timer value for a power condition and enable or disable the 24259a6844d5SKenneth D. Merrycondition. 24269a6844d5SKenneth D. MerrySee the 24279a6844d5SKenneth D. Merry.Dq list 24289a6844d5SKenneth D. Merrydisplay described below to see what the current timer settings are for each 24299a6844d5SKenneth D. MerryIdle and Standby mode supported by the drive. 24309a6844d5SKenneth D. Merry.Bl -tag -width 8n 24319a6844d5SKenneth D. Merry.It Fl e 24329a6844d5SKenneth D. MerryEnable the power condition. 24339a6844d5SKenneth D. MerryOne of 24349a6844d5SKenneth D. Merry.Fl e 24359a6844d5SKenneth D. Merryor 24369a6844d5SKenneth D. Merry.Fl d 24379a6844d5SKenneth D. Merryis required. 24389a6844d5SKenneth D. Merry.It Fl d 24399a6844d5SKenneth D. MerryDisable the power condition. 24409a6844d5SKenneth D. MerryOne of 24419a6844d5SKenneth D. Merry.Fl d 24429a6844d5SKenneth D. Merryor 24439a6844d5SKenneth D. Merry.Fl e 24449a6844d5SKenneth D. Merryis required. 24459a6844d5SKenneth D. Merry.It Fl T Ar timer 24469a6844d5SKenneth D. MerrySpecify the timer in seconds. 24479a6844d5SKenneth D. MerryThe user may specify a timer as a floating point number with a maximum 24489a6844d5SKenneth D. Merrysupported resolution of tenths of a second. 24499a6844d5SKenneth D. MerryDrives may or may not support sub-second timer values. 24509a6844d5SKenneth D. Merry.It Fl p Ar cond 24519a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24529a6844d5SKenneth D. MerryThis argument is required. 24539a6844d5SKenneth D. Merry.It Fl s 24549a6844d5SKenneth D. MerrySave the timer and power condition enable/disable state. 24559a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for 24569a6844d5SKenneth D. Merrythis power condition will be affected. 24579a6844d5SKenneth D. Merry.El 24589a6844d5SKenneth D. Merry.It state 24599a6844d5SKenneth D. MerryEnable or disable a particular power condition. 24609a6844d5SKenneth D. Merry.Bl -tag -width 7n 246177d9b0efSAlan Somers.It Fl e 246277d9b0efSAlan SomersEnable the power condition. 246377d9b0efSAlan SomersOne of 246477d9b0efSAlan Somers.Fl e 246577d9b0efSAlan Somersor 246677d9b0efSAlan Somers.Fl d 246777d9b0efSAlan Somersis required. 246877d9b0efSAlan Somers.It Fl d 246977d9b0efSAlan SomersDisable the power condition. 247077d9b0efSAlan SomersOne of 247177d9b0efSAlan Somers.Fl d 247277d9b0efSAlan Somersor 247377d9b0efSAlan Somers.Fl e 247477d9b0efSAlan Somersis required. 24759a6844d5SKenneth D. Merry.It Fl p Ar cond 24769a6844d5SKenneth D. MerrySpecify the power condition: Idle_a, Idle_b, Idle_c, Standby_y, Standby_z. 24779a6844d5SKenneth D. MerryThis argument is required. 24789a6844d5SKenneth D. Merry.It Fl s 24799a6844d5SKenneth D. MerrySave the power condition enable/disable state. 24809a6844d5SKenneth D. MerryBy default, if this option is not specified, only the current values for 24819a6844d5SKenneth D. Merrythis power condition will be affected. 24829a6844d5SKenneth D. Merry.El 24839a6844d5SKenneth D. Merry.It enable 24849a6844d5SKenneth D. MerryEnable the Extended Power Condition (EPC) feature set. 24859a6844d5SKenneth D. Merry.It disable 24869a6844d5SKenneth D. MerryDisable the Extended Power Condition (EPC) feature set. 24879a6844d5SKenneth D. Merry.It source 24889a6844d5SKenneth D. MerrySpecify the EPC power source. 24899a6844d5SKenneth D. Merry.Bl -tag -width 6n 24909a6844d5SKenneth D. Merry.It Fl S Ar src 24919a6844d5SKenneth D. MerrySpecify the power source, either 24929a6844d5SKenneth D. Merry.Dq battery 24939a6844d5SKenneth D. Merryor 24949a6844d5SKenneth D. Merry.Dq nonbattery . 24959a6844d5SKenneth D. Merry.El 24969a6844d5SKenneth D. Merry.It status 24979a6844d5SKenneth D. MerryGet the current status of several parameters related to the Extended Power 24989a6844d5SKenneth D. MerryCondition (EPC) feature set, including whether APM and EPC are supported 24999a6844d5SKenneth D. Merryand enabled, whether Low Power Standby is supported, whether setting the 25009a6844d5SKenneth D. MerryEPC power source is supported, whether Low Power Standby is supported and 25019a6844d5SKenneth D. Merrythe current power condition. 25029a6844d5SKenneth D. Merry.Bl -tag -width 3n 25039a6844d5SKenneth D. Merry.It Fl P 25049a6844d5SKenneth D. MerryOnly report the current power condition. 25059a6844d5SKenneth D. MerrySome drives will exit their current power condition if a command other than 25069a6844d5SKenneth D. Merrythe 25079a6844d5SKenneth D. Merry.Tn ATA 25089a6844d5SKenneth D. MerryCHECK POWER MODE command is received. 25099a6844d5SKenneth D. MerryIf this flag is specified, 25109a6844d5SKenneth D. Merry.Nm 25119a6844d5SKenneth D. Merrywill only issue the 25129a6844d5SKenneth D. Merry.Tn ATA 25139a6844d5SKenneth D. MerryCHECK POWER MODE command to the drive. 25149a6844d5SKenneth D. Merry.El 25159a6844d5SKenneth D. Merry.It list 25169a6844d5SKenneth D. MerryDisplay the 25179a6844d5SKenneth D. Merry.Tn ATA 25189a6844d5SKenneth D. MerryPower Conditions log (Log Address 0x08). 25199a6844d5SKenneth D. MerryThis shows the list of Idle and Standby power conditions the drive 25209a6844d5SKenneth D. Merrysupports, and a number of parameters about each condition, including 25219a6844d5SKenneth D. Merrywhether it is enabled and what the timer value is. 25229a6844d5SKenneth D. Merry.El 25239a6844d5SKenneth D. Merry.El 252428db0a5eSKenneth D. Merry.It Ic timestamp 252528db0a5eSKenneth D. MerryIssue REPORT TIMESTAMP or SET TIMESTAMP 252628db0a5eSKenneth D. Merry.Tn SCSI 252764440392SGordon Berglingcommands. 252864440392SGordon BerglingEither the 252928db0a5eSKenneth D. Merry.Fl r 253028db0a5eSKenneth D. Merryoption or the 253128db0a5eSKenneth D. Merry.Fl s 253228db0a5eSKenneth D. Merryoption must be specified. 253328db0a5eSKenneth D. Merry.Bl -tag -width 6n 253428db0a5eSKenneth D. Merry.It Fl r 253528db0a5eSKenneth D. MerryReport the device's timestamp. 253628db0a5eSKenneth D. MerryIf no more arguments are specified, the timestamp will be reported using 253728db0a5eSKenneth D. Merrythe national representation of the date and time, followed by the time 253828db0a5eSKenneth D. Merryzone. 253928db0a5eSKenneth D. Merry.Bl -tag -width 9n 254028db0a5eSKenneth D. Merry.It Fl f Ar format 254128db0a5eSKenneth D. MerrySpecify the strftime format string, as documented in strftime(3), to be used 254228db0a5eSKenneth D. Merryto format the reported timestamp. 254328db0a5eSKenneth D. Merry.It Fl m 254428db0a5eSKenneth D. MerryReport the timestamp as milliseconds since the epoch. 254528db0a5eSKenneth D. Merry.It Fl U 254628db0a5eSKenneth D. MerryReport the timestamp using the national representation of the date and 254728db0a5eSKenneth D. Merrytime, but override the system time zone and use UTC instead. 254828db0a5eSKenneth D. Merry.El 254928db0a5eSKenneth D. Merry.El 255028db0a5eSKenneth D. Merry.Bl -tag -width 6n 255128db0a5eSKenneth D. Merry.It Fl s 255264440392SGordon BerglingSet the device's timestamp. 255364440392SGordon BerglingEither the 255428db0a5eSKenneth D. Merry.Fl f 255528db0a5eSKenneth D. Merryand 255628db0a5eSKenneth D. Merry.Fl T 255728db0a5eSKenneth D. Merryoptions or the 255828db0a5eSKenneth D. Merry.Fl U 255928db0a5eSKenneth D. Merryoption must be specified. 256028db0a5eSKenneth D. Merry.Bl -tag -width 9n 256128db0a5eSKenneth D. Merry.It Fl f Ar format 256228db0a5eSKenneth D. MerrySpecify the strptime format string, as documented in strptime(3). 256328db0a5eSKenneth D. MerryThe time must also be specified with the 256428db0a5eSKenneth D. Merry.Fl T 256528db0a5eSKenneth D. Merryoption. 2566d618624cSKenneth D. Merry.It Fl T Ar time 256728db0a5eSKenneth D. MerryProvide the time in the format specified with the 256828db0a5eSKenneth D. Merry.Fl f 256928db0a5eSKenneth D. Merryoption. 257028db0a5eSKenneth D. Merry.It Fl U 257128db0a5eSKenneth D. MerrySet the timestamp to the host system's time in UTC. 257228db0a5eSKenneth D. Merry.El 257328db0a5eSKenneth D. Merry.El 2574d455c0d0SWarner Losh.It Ic devtype 2575d455c0d0SWarner LoshPrint out the device type for specified device. 2576d455c0d0SWarner Losh.Bl -tag -width 10n 2577d455c0d0SWarner Losh.It ata 2578d455c0d0SWarner LoshAn ATA device attached directly to an ATA controller 2579d455c0d0SWarner Losh.It satl 2580d455c0d0SWarner LoshAn SATA device attached behind a SAS controller via SCSI-ATA Translation Layer (SATL) 2581d455c0d0SWarner Losh.It scsi 2582d455c0d0SWarner LoshA SCSI device 2583d455c0d0SWarner Losh.It nvme 2584d455c0d0SWarner LoshAn directly attached NVMe device 2585d455c0d0SWarner Losh.It mmcsd 2586d455c0d0SWarner LoshAn MMC or SD device attached via a mmcsd bus 2587d455c0d0SWarner Losh.It none 2588d455c0d0SWarner LoshNo device type reported 2589d455c0d0SWarner Losh.It unknown 2590d455c0d0SWarner LoshDevice type is unknown 2591d455c0d0SWarner Losh.It illegal 2592d455c0d0SWarner LoshA programming error occurred 2593d455c0d0SWarner Losh.El 259453cce2e7SWarner Losh.It Ic depop 259553cce2e7SWarner LoshCommands necessary to support the depopulation (depop) of defective elements of a device 259653cce2e7SWarner Losh(typically heads for hard drives) or setting capacity point (typically used on 259753cce2e7SWarner Loshflash drives). 259853cce2e7SWarner LoshIssues either GET PHYSICAL ELEMENT STATUS, REMOVE ELEMENT AND TRUNCATE, or RESTORE 259953cce2e7SWarner LoshELEMENT AND REBUILD command to manage storage elements of a drive. 260053cce2e7SWarner LoshRemoval or restoration of elements may take up to a day to complete. 260153cce2e7SWarner LoshOne of the 260253cce2e7SWarner Losh.Fl d , 260353cce2e7SWarner Losh.Fl l , 260453cce2e7SWarner Loshor 260553cce2e7SWarner Losh.Fl r 260653cce2e7SWarner Loshoptions must be specified. 260753cce2e7SWarner LoshThese options are mutually exclusive. 260853cce2e7SWarner LoshOnly SCSI drives are supported. 260953cce2e7SWarner LoshChanging the storage elements of a storage drive may result in the loss of all 261053cce2e7SWarner Loshdata on that storage drive. 261153cce2e7SWarner LoshThe drive may need to reinitialize after 261253cce2e7SWarner Losh.Fl d 261353cce2e7SWarner Loshor 261453cce2e7SWarner Losh.Fl r 261553cce2e7SWarner Loshcommands. 261653cce2e7SWarner LoshThe data on the drive is inaccessible until one of these commands complete. 261753cce2e7SWarner LoshOnce one of these commands start, the drive is format corrupt until the 261853cce2e7SWarner Loshoperation successfully completes. 261953cce2e7SWarner LoshWhile format corrupt, no read or write I/O is possible to the drive. 262053cce2e7SWarner LoshIf the drive power cycles, it will remain format corrupt and the operation 262153cce2e7SWarner Loshmust be restarted. 262253cce2e7SWarner LoshTEST UNIT READY or 262353cce2e7SWarner Losh.Dq camcontrol tur 262453cce2e7SWarner Loshcan monitor an in-progress depop operation. 262553cce2e7SWarner Losh.Bl -tag -width 6n 262653cce2e7SWarner Losh.It Fl c Ar capacity 262753cce2e7SWarner LoshSpecify the desired capacity point for the drive. 262853cce2e7SWarner LoshValid only for the 262953cce2e7SWarner Losh.Fl d 263053cce2e7SWarner Loshflag. 263153cce2e7SWarner Losh.It Fl d 263253cce2e7SWarner LoshRemove the physical element from service or set the capacity point specified by the 263353cce2e7SWarner Losh.Fl e 263453cce2e7SWarner Loshor 263553cce2e7SWarner Losh.Fl c 263653cce2e7SWarner Loshflags. 263753cce2e7SWarner LoshThe drive's capacity may be reduced by this operation. 263853cce2e7SWarner Losh.It Fl e Ar element 263953cce2e7SWarner LoshSpecify the physical element to remove from service. 264053cce2e7SWarner LoshValid only for the 264153cce2e7SWarner Losh.Fl d 264253cce2e7SWarner Loshflag. 264353cce2e7SWarner Losh.It Fl l 264453cce2e7SWarner LoshReport the current status of the physical elements of a drive. 264553cce2e7SWarner Losh.It Fl r 264653cce2e7SWarner LoshRestore all the eligible physical elements to service. 264753cce2e7SWarner Losh.El 264833fab22eSKenneth D. Merry.It Ic help 26495a251d70SKenneth D. MerryPrint out verbose usage information. 2650525689f1SJustin T. Gibbs.El 2651525689f1SJustin T. Gibbs.Sh ENVIRONMENT 2652525689f1SJustin T. GibbsThe 2653525689f1SJustin T. Gibbs.Ev SCSI_MODES 2654525689f1SJustin T. Gibbsvariable allows the user to specify an alternate mode page format file. 2655525689f1SJustin T. Gibbs.Pp 2656525689f1SJustin T. GibbsThe 2657525689f1SJustin T. Gibbs.Ev EDITOR 2658525689f1SJustin T. Gibbsvariable determines which text editor 26597c7fb079SRuslan Ermilov.Nm 2660525689f1SJustin T. Gibbsstarts when editing mode pages. 2661525689f1SJustin T. Gibbs.Sh FILES 2662525689f1SJustin T. Gibbs.Bl -tag -width /usr/share/misc/scsi_modes -compact 2663525689f1SJustin T. Gibbs.It Pa /usr/share/misc/scsi_modes 2664525689f1SJustin T. Gibbsis the SCSI mode format database. 2665525689f1SJustin T. Gibbs.It Pa /dev/xpt0 2666525689f1SJustin T. Gibbsis the transport layer device. 2667525689f1SJustin T. Gibbs.It Pa /dev/pass* 2668525689f1SJustin T. Gibbsare the CAM application passthrough devices. 2669525689f1SJustin T. Gibbs.El 2670525689f1SJustin T. Gibbs.Sh EXAMPLES 2671525689f1SJustin T. Gibbs.Dl camcontrol eject -n cd -u 1 -v 2672525689f1SJustin T. Gibbs.Pp 2673525689f1SJustin T. GibbsEject the CD from cd1, and print SCSI sense information if the command 2674525689f1SJustin T. Gibbsfails. 2675525689f1SJustin T. Gibbs.Pp 2676b3550398SKenneth D. Merry.Dl camcontrol tur da0 2677525689f1SJustin T. Gibbs.Pp 2678525689f1SJustin T. GibbsSend the SCSI test unit ready command to da0. 2679e1205e80SPhilippe CharnierThe 26807c7fb079SRuslan Ermilov.Nm 2681e1205e80SPhilippe Charnierutility will report whether the disk is ready, but will not display sense 2682525689f1SJustin T. Gibbsinformation if the command fails since the 2683525689f1SJustin T. Gibbs.Fl v 2684525689f1SJustin T. Gibbsswitch was not specified. 2685c7938743SMike Pritchard.Bd -literal -offset indent 2686492a2ef5SKenneth D. Merrycamcontrol tur da1 -E -C 4 -t 50 -Q head -v 2687525689f1SJustin T. Gibbs.Ed 2688525689f1SJustin T. Gibbs.Pp 26899806e231SRuslan ErmilovSend a test unit ready command to da1. 26909806e231SRuslan ErmilovEnable kernel error recovery. 26919806e231SRuslan ErmilovSpecify a retry count of 4, and a timeout of 50 seconds. 26929806e231SRuslan ErmilovEnable sense 2693525689f1SJustin T. Gibbsprinting (with the 2694525689f1SJustin T. Gibbs.Fl v 26959806e231SRuslan Ermilovflag) if the command fails. 26969806e231SRuslan ErmilovSince error recovery is turned on, the 2697525689f1SJustin T. Gibbsdisk will be spun up if it is not currently spinning. 2698e1205e80SPhilippe CharnierThe 2699492a2ef5SKenneth D. Merry.Tn SCSI 2700492a2ef5SKenneth D. Merrytask attribute for the command will be set to Head of Queue. 2701492a2ef5SKenneth D. MerryThe 27027c7fb079SRuslan Ermilov.Nm 2703e1205e80SPhilippe Charnierutility will report whether the disk is ready. 2704c7938743SMike Pritchard.Bd -literal -offset indent 2705525689f1SJustin T. Gibbscamcontrol cmd -n cd -u 1 -v -c "3C 00 00 00 00 00 00 00 0e 00" \e 2706525689f1SJustin T. Gibbs -i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1" 2707525689f1SJustin T. Gibbs.Ed 2708525689f1SJustin T. Gibbs.Pp 27099806e231SRuslan ErmilovIssue a READ BUFFER command (0x3C) to cd1. 27109806e231SRuslan ErmilovDisplay the buffer size of cd1, 27119806e231SRuslan Ermilovand display the first 10 bytes from the cache on cd1. 27129806e231SRuslan ErmilovDisplay SCSI sense 2713525689f1SJustin T. Gibbsinformation if the command fails. 2714c7938743SMike Pritchard.Bd -literal -offset indent 27158604fe2eSSADA Kenjicamcontrol cmd -n cd -u 1 -v -c "3B 00 00 00 00 00 00 00 0e 00" \e 2716525689f1SJustin T. Gibbs -o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8 2717525689f1SJustin T. Gibbs.Ed 2718525689f1SJustin T. Gibbs.Pp 27199806e231SRuslan ErmilovIssue a WRITE BUFFER (0x3B) command to cd1. 27209806e231SRuslan ErmilovWrite out 10 bytes of data, 27219806e231SRuslan Ermilovnot including the (reserved) 4 byte header. 27229806e231SRuslan ErmilovPrint out sense information if 27239806e231SRuslan Ermilovthe command fails. 27249806e231SRuslan ErmilovBe very careful with this command, improper use may 2725525689f1SJustin T. Gibbscause data corruption. 2726c7938743SMike Pritchard.Bd -literal -offset indent 2727c60e19a8SKenneth D. Merrycamcontrol modepage da3 -m 1 -e -P 3 272894d09127SKenneth D. Merry.Ed 2729525689f1SJustin T. Gibbs.Pp 2730525689f1SJustin T. GibbsEdit mode page 1 (the Read-Write Error Recover page) for da3, and save the 27319806e231SRuslan Ermilovsettings on the drive. 27329806e231SRuslan ErmilovMode page 1 contains a disk drive's auto read and 2733525689f1SJustin T. Gibbswrite reallocation settings, among other things. 2734525689f1SJustin T. Gibbs.Pp 27355710d224SKenneth D. Merry.Dl camcontrol rescan all 27365710d224SKenneth D. Merry.Pp 2737db4fcadfSConrad MeyerRescan all SCSI buses in the system for devices that have been added, 27385710d224SKenneth D. Merryremoved or changed. 27395710d224SKenneth D. Merry.Pp 2740525689f1SJustin T. Gibbs.Dl camcontrol rescan 0 2741525689f1SJustin T. Gibbs.Pp 2742525689f1SJustin T. GibbsRescan SCSI bus 0 for devices that have been added, removed or changed. 2743525689f1SJustin T. Gibbs.Pp 2744525689f1SJustin T. Gibbs.Dl camcontrol rescan 0:1:0 2745525689f1SJustin T. Gibbs.Pp 2746525689f1SJustin T. GibbsRescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or 2747525689f1SJustin T. Gibbschanged. 27489deea857SKenneth D. Merry.Pp 2749c60e19a8SKenneth D. Merry.Dl camcontrol tags da5 -N 24 27509deea857SKenneth D. Merry.Pp 27519deea857SKenneth D. MerrySet the number of concurrent transactions for da5 to 24. 2752c7938743SMike Pritchard.Bd -literal -offset indent 27539deea857SKenneth D. Merrycamcontrol negotiate -n da -u 4 -T disable 27549deea857SKenneth D. Merry.Ed 27559deea857SKenneth D. Merry.Pp 27569deea857SKenneth D. MerryDisable tagged queueing for da4. 2757c7938743SMike Pritchard.Bd -literal -offset indent 27589deea857SKenneth D. Merrycamcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a 27599deea857SKenneth D. Merry.Ed 27609deea857SKenneth D. Merry.Pp 27619806e231SRuslan ErmilovNegotiate a sync rate of 20MHz and an offset of 15 with da3. 27629806e231SRuslan ErmilovThen send a 27639deea857SKenneth D. MerryTest Unit Ready command to make the settings take effect. 276406e79492SKenneth D. Merry.Bd -literal -offset indent 276506e79492SKenneth D. Merrycamcontrol smpcmd ses0 -v -r 4 "40 0 00 0" -R 1020 "s9 i1" 276606e79492SKenneth D. Merry.Ed 276706e79492SKenneth D. Merry.Pp 276806e79492SKenneth D. MerrySend the SMP REPORT GENERAL command to ses0, and display the number of PHYs 276906e79492SKenneth D. Merryit contains. 277006e79492SKenneth D. MerryDisplay SMP errors if the command fails. 27711146874aSSteven Hartland.Bd -literal -offset indent 27721146874aSSteven Hartlandcamcontrol security ada0 27731146874aSSteven Hartland.Ed 27741146874aSSteven Hartland.Pp 27751146874aSSteven HartlandReport security support and settings for ada0 27761146874aSSteven Hartland.Bd -literal -offset indent 277791804910SGavin Atkinsoncamcontrol security ada0 -U user -s MyPass 27781146874aSSteven Hartland.Ed 27791146874aSSteven Hartland.Pp 27801146874aSSteven HartlandEnable security on device ada0 with the password MyPass 27811146874aSSteven Hartland.Bd -literal -offset indent 278291804910SGavin Atkinsoncamcontrol security ada0 -U user -e MyPass 27831146874aSSteven Hartland.Ed 27841146874aSSteven Hartland.Pp 27851146874aSSteven HartlandSecure erase ada0 which has had security enabled with user password MyPass 27861146874aSSteven Hartland.Pp 27871146874aSSteven Hartland.Em WARNING! WARNING! WARNING! 27881146874aSSteven Hartland.Pp 27891146874aSSteven HartlandThis will 27901146874aSSteven Hartland.Em ERASE ALL 27911146874aSSteven Hartlanddata from the device, so backup your data before using! 27921146874aSSteven Hartland.Pp 27935bb17266SJoel DahlThis command can be used against an SSD drive to restoring it to 27941146874aSSteven Hartlandfactory default write performance. 27959e68761cSSteven Hartland.Bd -literal -offset indent 27969e68761cSSteven Hartlandcamcontrol hpa ada0 27979e68761cSSteven Hartland.Ed 27989e68761cSSteven Hartland.Pp 27999e68761cSSteven HartlandReport HPA support and settings for ada0 (also reported via 28009e68761cSSteven Hartlandidentify). 28019e68761cSSteven Hartland.Bd -literal -offset indent 28029e68761cSSteven Hartlandcamcontrol hpa ada0 -s 10240 28039e68761cSSteven Hartland.Ed 28049e68761cSSteven Hartland.Pp 28059e68761cSSteven HartlandEnables HPA on ada0 setting the maximum reported sectors to 10240. 28069e68761cSSteven Hartland.Pp 28079e68761cSSteven Hartland.Em WARNING! WARNING! WARNING! 28089e68761cSSteven Hartland.Pp 28099e68761cSSteven HartlandThis will 28109e68761cSSteven Hartland.Em PREVENT ACCESS 28119e68761cSSteven Hartlandto all data on the device beyond this limit until HPA is disabled by setting 28129e68761cSSteven HartlandHPA to native max sectors of the device, which can only be done after a 28139e68761cSSteven Hartlandpower-on or hardware reset! 28149e68761cSSteven Hartland.Pp 28159e68761cSSteven Hartland.Em DO NOT 28169e68761cSSteven Hartlanduse this on a device which has an active filesystem! 281708df2e3eSKenneth D. Merry.Bd -literal -offset indent 281808df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_keys 281908df2e3eSKenneth D. Merry.Ed 282008df2e3eSKenneth D. Merry.Pp 282108df2e3eSKenneth D. MerryThis will read any persistent reservation keys registered with da0, and 282208df2e3eSKenneth D. Merrydisplay any errors encountered when sending the PERSISTENT RESERVE IN 282308df2e3eSKenneth D. Merry.Tn SCSI 282408df2e3eSKenneth D. Merrycommand. 282508df2e3eSKenneth D. Merry.Bd -literal -offset indent 282608df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -a -K 0x12345678 282708df2e3eSKenneth D. Merry.Ed 282808df2e3eSKenneth D. Merry.Pp 282908df2e3eSKenneth D. MerryThis will register the persistent reservation key 0x12345678 with da0, 283008df2e3eSKenneth D. Merryapply that registration to all ports on da0, and display any errors that 283108df2e3eSKenneth D. Merryoccur when sending the PERSISTENT RESERVE OUT command. 283208df2e3eSKenneth D. Merry.Bd -literal -offset indent 283308df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o reserve -s lun -k 0x12345678 -T ex_ac 283408df2e3eSKenneth D. Merry.Ed 283508df2e3eSKenneth D. Merry.Pp 283608df2e3eSKenneth D. MerryThis will reserve da0 for the exlusive use of the initiator issuing the 283708df2e3eSKenneth D. Merrycommand. 283808df2e3eSKenneth D. MerryThe scope of the reservation is the entire LUN. 283908df2e3eSKenneth D. MerryAny errors sending the PERSISTENT RESERVE OUT command will be displayed. 284008df2e3eSKenneth D. Merry.Bd -literal -offset indent 284108df2e3eSKenneth D. Merrycamcontrol persist da0 -v -i read_full 284208df2e3eSKenneth D. Merry.Ed 284308df2e3eSKenneth D. Merry.Pp 284408df2e3eSKenneth D. MerryThis will display the full status of all reservations on da0 and print out 284508df2e3eSKenneth D. Merrystatus if there are any errors. 284608df2e3eSKenneth D. Merry.Bd -literal -offset indent 284708df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o release -k 0x12345678 -T ex_ac 284808df2e3eSKenneth D. Merry.Ed 284908df2e3eSKenneth D. Merry.Pp 285008df2e3eSKenneth D. MerryThis will release a reservation on da0 of the type ex_ac 285108df2e3eSKenneth D. Merry(Exclusive Access). 285208df2e3eSKenneth D. MerryThe Reservation Key for this registration is 0x12345678. 285308df2e3eSKenneth D. MerryAny errors that occur will be displayed. 285408df2e3eSKenneth D. Merry.Bd -literal -offset indent 285508df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register -K 0x12345678 -S \e 285608df2e3eSKenneth D. Merry -I sas,0x1234567812345678 -I sas,0x8765432187654321 285708df2e3eSKenneth D. Merry.Ed 285808df2e3eSKenneth D. Merry.Pp 285908df2e3eSKenneth D. MerryThis will register the key 0x12345678 with da0, specifying that it applies 286008df2e3eSKenneth D. Merryto the SAS initiators with SAS addresses 0x1234567812345678 and 286108df2e3eSKenneth D. Merry0x8765432187654321. 286208df2e3eSKenneth D. Merry.Bd -literal -offset indent 286308df2e3eSKenneth D. Merrycamcontrol persist da0 -v -o register_move -k 0x87654321 \e 286408df2e3eSKenneth D. Merry -K 0x12345678 -U -p -R 2 -I fcp,0x1234567812345678 286508df2e3eSKenneth D. Merry.Ed 286608df2e3eSKenneth D. Merry.Pp 286708df2e3eSKenneth D. MerryThis will move the registration from the current initiator, whose 286808df2e3eSKenneth D. MerryRegistration Key is 0x87654321, to the Fibre Channel initiator with the 286908df2e3eSKenneth D. MerryFiber Channel World Wide Node Name 0x1234567812345678. 287008df2e3eSKenneth D. MerryA new registration key, 0x12345678, will be registered for the initiator 287108df2e3eSKenneth D. Merrywith the Fibre Channel World Wide Node Name 0x1234567812345678, and the 287208df2e3eSKenneth D. Merrycurrent initiator will be unregistered from the target. 287308df2e3eSKenneth D. MerryThe reservation will be moved to relative target port 2 on the target 287408df2e3eSKenneth D. Merrydevice. 287508df2e3eSKenneth D. MerryThe registration will persist across power losses. 28765672fac9SKenneth D. Merry.Bd -literal -offset indent 28775672fac9SKenneth D. Merrycamcontrol attrib sa0 -v -i attr_values -p 1 28785672fac9SKenneth D. Merry.Ed 28795672fac9SKenneth D. Merry.Pp 28805672fac9SKenneth D. MerryThis will read and decode the attribute values from partition 1 on the tape 28815672fac9SKenneth D. Merryin tape drive sa0, and will display any 28825672fac9SKenneth D. Merry.Tn SCSI 28835672fac9SKenneth D. Merryerrors that result. 28849a6844d5SKenneth D. Merry.Bd -literal -offset indent 28859a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -P summary 28869a6844d5SKenneth D. Merry.Ed 28879a6844d5SKenneth D. Merry.Pp 28889a6844d5SKenneth D. MerryThis will request the SMR zone list from disk da0, and print out a 28899a6844d5SKenneth D. Merrysummary of the zone parameters, and display any 28909a6844d5SKenneth D. Merry.Tn SCSI 28919a6844d5SKenneth D. Merryor 28929a6844d5SKenneth D. Merry.Tn ATA 28939a6844d5SKenneth D. Merryerrors that result. 28949a6844d5SKenneth D. Merry.Bd -literal -offset indent 28959a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rz -o reset 28969a6844d5SKenneth D. Merry.Ed 28979a6844d5SKenneth D. Merry.Pp 28989a6844d5SKenneth D. MerryThis will request the list of SMR zones that should have their write 28999a6844d5SKenneth D. Merrypointer reset from the disk da0, and display any 29009a6844d5SKenneth D. Merry.Tn SCSI 29019a6844d5SKenneth D. Merryor 29029a6844d5SKenneth D. Merry.Tn ATA 29039a6844d5SKenneth D. Merryerrors that result. 29049a6844d5SKenneth D. Merry.Bd -literal -offset indent 29059a6844d5SKenneth D. Merrycamcontrol zone da0 -v -c rwp -l 0x2c80000 29069a6844d5SKenneth D. Merry.Ed 29079a6844d5SKenneth D. Merry.Pp 29089a6844d5SKenneth D. MerryThis will issue the Reset Write Pointer command to disk da0 for the zone 29099a6844d5SKenneth D. Merrythat starts at LBA 0x2c80000 and display any 29109a6844d5SKenneth D. Merry.Tn SCSI 29119a6844d5SKenneth D. Merryor 29129a6844d5SKenneth D. Merry.Tn ATA 29139a6844d5SKenneth D. Merryerrors that result. 29149a6844d5SKenneth D. Merry.Bd -literal -offset indent 29159a6844d5SKenneth D. Merrycamcontrol epc ada0 -c timer -T 60.1 -p Idle_a -e -s 29169a6844d5SKenneth D. Merry.Ed 29179a6844d5SKenneth D. Merry.Pp 29189a6844d5SKenneth D. MerrySet the timer for the Idle_a power condition on drive 29199a6844d5SKenneth D. Merry.Pa ada0 29209a6844d5SKenneth D. Merryto 60.1 seconds, enable that particular power condition, and save the timer 29219a6844d5SKenneth D. Merryvalue and the enabled state of the power condition. 29229a6844d5SKenneth D. Merry.Bd -literal -offset indent 29239a6844d5SKenneth D. Merrycamcontrol epc da4 -c goto -p Standby_z -H 29249a6844d5SKenneth D. Merry.Ed 29259a6844d5SKenneth D. Merry.Pp 29269a6844d5SKenneth D. MerryTell drive 29279a6844d5SKenneth D. Merry.Pa da4 29289a6844d5SKenneth D. Merryto go to the Standby_z power state (which is 29299a6844d5SKenneth D. Merrythe drive's lowest power state) and hold in that state until it is 29309a6844d5SKenneth D. Merryexplicitly released by another 29319a6844d5SKenneth D. Merry.Cm goto 29329a6844d5SKenneth D. Merrycommand. 29339a6844d5SKenneth D. Merry.Bd -literal -offset indent 29349a6844d5SKenneth D. Merrycamcontrol epc da2 -c status -P 29359a6844d5SKenneth D. Merry.Ed 29369a6844d5SKenneth D. Merry.Pp 29379a6844d5SKenneth D. MerryReport only the power state of 29389a6844d5SKenneth D. Merrydrive 29399a6844d5SKenneth D. Merry.Pa da2 . 29409a6844d5SKenneth D. MerrySome drives will power up in response to the commands sent by the 29419a6844d5SKenneth D. Merry.Pa status 29429a6844d5SKenneth D. Merrysubcommand, and the 29439a6844d5SKenneth D. Merry.Fl P 29449a6844d5SKenneth D. Merryoption causes 29459a6844d5SKenneth D. Merry.Nm 29469a6844d5SKenneth D. Merryto only send the 29479a6844d5SKenneth D. Merry.Tn ATA 29489a6844d5SKenneth D. MerryCHECK POWER MODE command, which should not trigger a change in the drive's 29499a6844d5SKenneth D. Merrypower state. 29509a6844d5SKenneth D. Merry.Bd -literal -offset indent 29519a6844d5SKenneth D. Merrycamcontrol epc ada0 -c list 29529a6844d5SKenneth D. Merry.Ed 29539a6844d5SKenneth D. Merry.Pp 29549a6844d5SKenneth D. MerryDisplay the ATA Power Conditions log (Log Address 0x08) for 29559a6844d5SKenneth D. Merrydrive 29569a6844d5SKenneth D. Merry.Pa ada0 . 295728db0a5eSKenneth D. Merry.Bd -literal -offset indent 2958d618624cSKenneth D. Merrycamcontrol timestamp sa0 -s -f "%a, %d %b %Y %T %z" \e 2959d618624cSKenneth D. Merry -T "Wed, 26 Oct 2016 21:43:57 -0600" 296028db0a5eSKenneth D. Merry.Ed 296128db0a5eSKenneth D. Merry.Pp 296228db0a5eSKenneth D. MerrySet the timestamp of drive 296328db0a5eSKenneth D. Merry.Pa sa0 296428db0a5eSKenneth D. Merryusing a 296528db0a5eSKenneth D. Merry.Xr strptime 3 296628db0a5eSKenneth D. Merryformat string followed by a time string 296728db0a5eSKenneth D. Merrythat was created using this format string. 2968525689f1SJustin T. Gibbs.Sh SEE ALSO 2969525689f1SJustin T. Gibbs.Xr cam 3 , 29709deea857SKenneth D. Merry.Xr cam_cdbparse 3 , 2971c0bdb22bSMatthew Hunt.Xr cam 4 , 2972525689f1SJustin T. Gibbs.Xr pass 4 , 297328b475b0SEdward Tomasz Napierala.Xr xpt 4 , 297428b475b0SEdward Tomasz Napierala.Xr trim 8 , 297528b475b0SEdward Tomasz Napierala.Xr zonectl 8 2976525689f1SJustin T. Gibbs.Sh HISTORY 2977525689f1SJustin T. GibbsThe 29787c7fb079SRuslan Ermilov.Nm 2979e1205e80SPhilippe Charnierutility first appeared in 2980525689f1SJustin T. Gibbs.Fx 3.0 . 2981525689f1SJustin T. Gibbs.Pp 2982525689f1SJustin T. GibbsThe mode page editing code and arbitrary SCSI command code are based upon 2983525689f1SJustin T. Gibbscode in the old 2984525689f1SJustin T. Gibbs.Xr scsi 8 2985525689f1SJustin T. Gibbsutility and 2986525689f1SJustin T. Gibbs.Xr scsi 3 29879806e231SRuslan Ermilovlibrary, written by Julian Elischer and Peter Dufault. 29889806e231SRuslan ErmilovThe 2989525689f1SJustin T. Gibbs.Xr scsi 8 2990753d686dSRuslan Ermilovprogram first appeared in 2991753d686dSRuslan Ermilov.Bx 386 0.1.2.4 , 2992753d686dSRuslan Ermilovand first appeared in 299333fab22eSKenneth D. Merry.Fx 2994525689f1SJustin T. Gibbsin 2995525689f1SJustin T. Gibbs.Fx 2.0.5 . 2996525689f1SJustin T. Gibbs.Sh AUTHORS 2997bd0891ceSBaptiste Daroussin.An Kenneth Merry Aq Mt ken@FreeBSD.org 2998525689f1SJustin T. Gibbs.Sh BUGS 29990227791bSRuslan ErmilovThe code that parses the generic command line arguments does not know that 30009806e231SRuslan Ermilovsome of the subcommands take multiple arguments. 30019806e231SRuslan ErmilovSo if, for instance, you 3002525689f1SJustin T. Gibbstried something like this: 3003c7938743SMike Pritchard.Bd -literal -offset indent 3004b9e3972aSKenneth D. Merrycamcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v 3005525689f1SJustin T. Gibbs.Ed 3006525689f1SJustin T. Gibbs.Pp 3007525689f1SJustin T. GibbsThe sense information from the test unit ready command would not get 3008525689f1SJustin T. Gibbsprinted out, since the first 3009525689f1SJustin T. Gibbs.Xr getopt 3 3010525689f1SJustin T. Gibbscall in 30117c7fb079SRuslan Ermilov.Nm 3012525689f1SJustin T. Gibbsbails out when it sees the second argument to 3013525689f1SJustin T. Gibbs.Fl c 3014c4d9468eSRuslan Ermilov(0x00), 30159806e231SRuslan Ermilovabove. 30169806e231SRuslan ErmilovFixing this behavior would take some gross code, or changes to the 3017525689f1SJustin T. Gibbs.Xr getopt 3 30189806e231SRuslan Ermilovinterface. 30199806e231SRuslan ErmilovThe best way to circumvent this problem is to always make sure 3020525689f1SJustin T. Gibbsto specify generic 30217c7fb079SRuslan Ermilov.Nm 3022525689f1SJustin T. Gibbsarguments before any command-specific arguments. 3023