]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/atazz
/sys/man/*/*: fix perms (sorry)
[plan9front.git] / sys / man / 8 / atazz
1 .TH ATAZZ 8
2 .SH NAME
3 atazz \- ATA target control
4 .SH SYNOPSIS
5 .B atazz
6 [
7 .B -r
8 ]
9 [
10 .IR sddev
11 ]
12 .br
13 .B atazz
14 .B -c
15 .I cmd
16 .SH DESCRIPTION
17 .I Atazz
18 is an interactive program for exercising
19 raw ATA devices.
20 Its intended purpose is to support odd and
21 administrative commands without requiring this
22 functionality be implemented by each device driver.
23 It reads commands from standard input and applies
24 them to an ATA target.  Communication is in SATA
25 FIS format.  Non-ATA devices accessed
26 through the
27 .IR sd (3)
28 interface will not work; ATAPI devices will respond
29 to the commands in the ACS-2 packet feature set.
30 If the
31 .B -c
32 option is given, the name of the given numeric ATA
33 command is printed.
34 .I sddev
35 is given on the command line, an
36 .B open
37 (see below)
38 is immediately applied to the target.
39 On completion of a command, any errors are
40 printed followed by the prompt
41 .LR "az> " .
42 The response FIS may be printed with the
43 command
44 .BR rfis .
45 Some commands like
46 .B "identify device"
47 print processed output by default.  Redirecting the
48 output to a file will give the raw output as will the
49 .B -r
50 flag.
51 In addition the following commands are implemented
52 internally
53 .TF "< > <> file"
54 .PD
55 .TP
56 .BI "< > <> " file
57 Redirect output, input or both to or from a file.
58 If
59 .I file
60 is missing, then the redirection is closed.
61 .TP
62 .B close
63 Close the currently open device.
64 .TP
65 .B dev
66 Print device path and basic information.
67 .TP
68 .BR issuetr " [ \fIcommand\fP ... ]"
69 Toggle command issue tracing.  With no arguments,
70 issuetr toggles tracing for all commands.  Commands
71 may be specified by number.
72 .TP
73 .BI open " dev
74 Open the named device.
75 .B probe
76 Print a list of available device paths, size, sector size
77 and WWNs.  The first column is a suitable argument
78 for
79 .BR open .
80 .TP
81 .B rfis
82 Print the returned FIS, if any.
83 .PP
84 For all commands, it is possible to manipulate
85 the sata registers directly by specifying the register
86 name and an 8-bit value.  The registers are
87 .TF "features"
88 .PD
89 .TP
90 .B type
91 FIS type
92 .TP
93 .B flags
94 FIS flags
95 .TP
96 .B cmd
97 command register
98 .TP
99 .B feat
100 or 
101 .B features
102 .TP
103 .B lba0
104 or
105 .BR sector
106 .TP
107 .B lba8
108 or
109 .B cyl0
110 .TP
111 .B lba16
112 or
113 .B cyl8
114 .TP
115 .B lba24
116 or
117 .B dh
118 or
119 .B byte8
120 .TP
121 .B lba32
122 .TP
123 .B lba40
124 .TP
125 .B feat8
126 .TP
127 .B sc
128 sector count
129 .TP
130 .B sc8
131 .TP
132 .B r
133 reserved FIS register
134 .PP
135 In addition, commands that take an LBA and a number of
136 sectors may be given those arguments directly, for example
137 to read 1 sector starting at lba 100,
138 .EX
139 .IP
140 az> read dma ext 100 1
141 .EE
142 .PP
143 Subcommands are spelled out as in ACS-2.
144 For example, to set the transfer mode to UDMA 6, enable
145 the write cache and to enable and report smart status, one would
146 .EX
147 .IP
148 az> set features set transfer mode udma 6
149 az> set features enable write cache
150 az> smart enable operations
151 az> smart return status
152 normal
153 .EE
154 .PP
155 SCT pseudo-protocol commands are also supported.
156 .EX
157 .IP
158 az> sct error recovery time set read timer = 5
159 az> sct error recovery time return read timer
160 500ms
161 .EE
162 .PP
163 .SH FILES
164 .BR /dev/sd\fIXX\fP/raw
165 .SH SOURCE
166 /sys/src/cmd/atazz
167 .SH "SEE ALSO"
168 .IR scuzz (8),
169 .IR sd (3),
170 .IR smart (8),
171 .br
172 T13/2015 ACS-2 published online at http://www.t13.org.
173 .SH BUGS
174 Subcommand help doesn't work.  ACS-2 commands are
175 tortuously verbose.