1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
.\" $OpenBSD: uda.4,v 1.17 2003/07/21 09:24:33 jmc Exp $
.\" $NetBSD: uda.4,v 1.3 1996/03/03 17:14:10 thorpej Exp $
.\"
.\" Copyright (c) 1980, 1987, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" from: @(#)uda.4 6.6 (Berkeley) 3/27/91
.\"
.Dd March 27, 1991
.Dt UDA 4 vax
.Os
.Sh NAME
.Nm uda
.Nd
.Tn UDA50
disk controller interface
.Sh SYNOPSIS
.Cd "uda0 at uba? csr 0172150"
.Cd "uda1 at uba? csr 0160334"
.Cd "mscpbus* at uda?"
.Sh DESCRIPTION
This is a driver for the
.Tn DEC UDA50
disk controller and other
compatible controllers.
The
.Tn UDA50
communicates with the host through
a packet protocol known as the Mass Storage Control Protocol
.Pq Tn MSCP .
Consult the file
.Aq Pa vax/mscp.h
for a detailed description of this protocol.
.Pp
The
.Nm uda
driver
is a typical block-device disk driver; see
.Xr physio 9
for a description of block I/O.
The script
.Xr MAKEDEV 8
should be used to create the
.Nm uda
special files; should a special
file need to be created by hand, consult
.Xr mknod 8 .
.Pp
The
.Dv MSCP_PARANOIA
option enables runtime checking on all transfer completion responses
from the controller.
This increases disk I/O
overhead and may
be undesirable on slow machines, but is otherwise recommended.
.Pp
The first sector of each disk contains both a first-stage bootstrap program
and a disk label containing geometry information and partition layouts (see
.Xr disklabel 5 ) .
This sector is normally write-protected, and disk-to-disk copies should
avoid copying this sector.
The label may be updated with
.Xr disklabel 8 ,
which can also be used to write-enable and write-disable the sector.
The next 15 sectors contain a second-stage bootstrap program.
.Sh DISK SUPPORT
During autoconfiguration,
as well as when a drive is opened after all partitions are closed,
the first sector of the drive is examined for a disk label.
If a label is found, the geometry of the drive and the partition tables
are taken from it.
If no label is found,
the driver configures the type of each drive when it is first
encountered.
A default partition table in the driver is used for each type
of disk when a pack is not labelled.
The origin and size (in sectors) of the default pseudo-disks on each
drive are shown below.
Not all partitions begin on cylinder boundaries, as on other drives,
because previous drivers used one partition table for all drive types.
Variants of the partition tables are common; check the driver and the file
.Pa /etc/disktab
.Pq Xr disktab 5
for other possibilities.
.Pp
Special file names begin with
.Ql ra
and
.Ql rra
for the block and character files respectively.
The second component of the name, a drive unit number in the range of zero to
seven, is represented by a
.Ql \&?
in the disk layouts below.
The last component of the name is the file system partition designated
by a letter from
.Ql a
to
.Ql h
and which corresponds to a minor device number set: zero to seven,
eight to 15, 16 to 23 and so forth for drive zero, drive two and drive
three respectively (see
.Xr physio 9 ) .
The location and size (in sectors) of the partitions:
.Pp
RA60 partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 15884 Ta 33440
.It ra?c Ta 0 Ta 400176
.It ra?d Ta 49324 Ta 82080 Ta "same as 4.2BSD ra?g"
.It ra?e Ta 131404 Ta 268772 Ta "same as 4.2BSD ra?h"
.It ra?f Ta 49324 Ta 350852
.It ra?g Ta 242606 Ta 157570
.It ra?h Ta 49324 Ta 193282
.El
.Pp
RA70 partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 15972 Ta 33440
.It ra?c Ta 0 Ta 547041
.It ra?d Ta 34122 Ta 15884
.It ra?e Ta 357192 Ta 55936
.It ra?f Ta 413457 Ta 133584
.It ra?g Ta 341220 Ta 205821
.It ra?h Ta 49731 Ta 29136
.El
.Pp
RA80 partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 15884 Ta 33440
.It ra?c Ta 0 Ta 242606
.It ra?e Ta 49324 Ta 193282 Ta "same as old Berkeley ra?g"
.It ra?f Ta 49324 Ta 82080 Ta "same as 4.2BSD ra?g"
.It ra?g Ta 49910 Ta 192696
.It ra?h Ta 131404 Ta 111202 Ta "same as 4.2BSD"
.El
.Pp
RA81 partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 16422 Ta 66880
.It ra?c Ta 0 Ta 891072
.It ra?d Ta 375564 Ta 15884
.It ra?e Ta 391986 Ta 307200
.It ra?f Ta 699720 Ta 191352
.It ra?g Ta 375564 Ta 515508
.It ra?h Ta 83538 Ta 291346
.El
.Pp
RA81 partitions with 4.2BSD-compatible partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 16422 Ta 66880
.It ra?c Ta 0 Ta 891072
.It ra?d Ta 49324 Ta 82080 Ta "same as 4.2BSD ra?g"
.It ra?e Ta 131404 Ta 759668 Ta "same as 4.2BSD ra?h"
.It ra?f Ta 412490 Ta 478582 Ta "same as 4.2BSD ra?f"
.It ra?g Ta 375564 Ta 515508
.It ra?h Ta 83538 Ta 291346
.El
.Pp
RA82 partitions
.Bl -column "disk" "start" "length" -offset indent -compact
.It Sy "disk" Ta Sy "start" Ta Sy "length"
.It ra?a Ta 0 Ta 15884
.It ra?b Ta 16245 Ta 66880
.It ra?c Ta 0 Ta 1135554
.It ra?d Ta 375345 Ta 15884
.It ra?e Ta 391590 Ta 307200
.It ra?f Ta 669390 Ta 466164
.It ra?g Ta 375345 Ta 760209
.It ra?h Ta 83790 Ta 291346
.El
.Pp
The ra?a partition is normally used for the root file system, the ra?b
partition as a paging area, and the ra?c partition for pack-pack
copying (it maps the entire disk).
.Sh FILES
.Bl -tag -width /dev/rra[0-9][a-p] -compact
.It Pa /dev/ra[0-9][a-p]
.It Pa /dev/rra[0-9][a-p]
.El
.Sh DIAGNOSTICS
.Bl -diag
.It "panic: udaslave"
No command packets were available while the driver was looking
for disk drives.
The controller is not extending enough credits to use the drives.
.It "uda%d: no response to Get Unit Status request"
A disk drive was found, but did not respond to a status request.
This is either a hardware problem or someone pulling unit number
plugs very fast.
.It "uda%d: unit %d off line"
While searching for drives, the controller found one that
seems to be manually disabled.
It is ignored.
.It "uda%d: unable to get unit status"
Something went wrong while trying to determine the status of
a disk drive.
This is followed by an error detail.
.It "uda%d: unit %d, next %d"
This probably never happens, but I wanted to know if it did.
I have no idea what one should do about it.
.It "uda%d: cannot handle unit number %d (max is %d)"
The controller found a drive whose unit number is too large.
Valid unit numbers are those in the range [0..7].
.It "uda%d: uballoc map failed"
UNIBUS resource map allocation failed during initialization.
This can only happen if you have 496 devices on a UNIBUS.
.It "uda%d: timeout during init"
The controller did not initialize within ten seconds.
A hardware problem, but it sometimes goes away if you try again.
.It "uda%d: init failed, sa=%b"
The controller refused to initialize.
.It "uda%d: controller hung"
The controller never finished initialization.
Retrying may sometimes fix it.
.It "uda%d: still hung"
When the controller hangs, the driver occasionally tries to reinitialize
it.
This means it just tried, without success.
.It "panic: udastart: bp==NULL"
A bug in the driver has put an empty drive queue on a controller queue.
.It "uda%d: command ring too small"
If you increase
.Dv NCMDL2 ,
you may see a performance improvement.
(See
.Pa /sys/arch/vax/uba/uda.c . )
.It "panic: udastart"
A drive was found marked for status or on-line functions while performing
status or on-line functions.
This indicates a bug in the driver.
.It "uda%d: controller error, sa=0%o (%s)"
The controller reported an error.
The error code is printed in
octal, along with a short description if the code is known (see the
.%T UDA50 Maintenance Guide ,
.Tn DEC
part number
.Tn AA-M185B-TC ,
pp. 18-22).
If this occurs during normal
operation, the driver will reset it and retry pending I/O.
If
it occurs during configuration, the controller may be ignored.
.It "uda%d: stray intr"
The controller interrupted when it should have stayed quiet.
The interrupt has been ignored.
.It "uda%d: init step %d failed, sa=%b"
The controller reported an error during the named initialization step.
The driver will retry initialization later.
.It "uda%d: version %d model %d"
An informational message giving the revision level of the controller.
.It "uda%d: DMA burst size set to %d"
An informational message showing the
.Tn DMA
burst size, in words.
.It "panic: udaintr"
Indicates a bug in the generic
.Tn MSCP
code.
.It "uda%d: driver bug, state %d"
The driver has a bogus value for the controller state.
Something is quite wrong.
This is immediately followed by a
.Sq panic: udastate .
.It "uda%d: purge bdp %d"
A benign message tracing BDP purges.
I have been trying to figure out what BDP purges are for.
You might want to comment out this
call to log() in
.Pa /sys/arch/vax/uba/uda.c .
.It "uda%d: SETCTLRC failed: `detail'"
The Set Controller Characteristics command (the last part of the
controller initialization sequence) failed.
The
.Em detail
message tells why.
.It "uda%d: attempt to bring ra%d on line failed: `detail'"
The drive could not be brought on line.
The
.Em detail
message tells why.
.It "uda%d: ra%d: unknown type %d"
The type index of the named drive is not known to the driver, so the
drive will be ignored.
.It "uda%d: attempt to get status for ra%d failed: `detail'"
A status request failed.
The
.Em detail
message should tell why.
.It "panic: udareplace"
The controller reported completion of a
.Tn REPLACE
operation.
The driver never issues any
.Tn REPLACE Ns s ,
so something is wrong.
.It "panic: udabb"
The controller reported completion of bad block related I/O.
The
driver never issues any such, so something is wrong.
.It "uda%d: lost interrupt"
The controller has gone out to lunch, and is being reset to try to bring
it back.
.It "panic: mscp_go: AEB_MAX_BP too small"
You defined
.Dv AVOID_EMULEX_BUG
and increased
.Dv NCMDL2
and Emulex has
new firmware.
Raise
.Dv AEB_MAX_BP
or turn off
.Dv AVOID_EMULEX_BUG .
.It "uda%d: unit %d: unknown message type 0x%x ignored"
The controller responded with a mysterious message type.
See
.Pa /sys/vax/mscp.h
for a list of known message types.
This is probably a controller hardware problem.
.It "uda%d: unit %d out of range"
The disk drive unit number (the unit plug) is higher than the
maximum number the driver allows (currently 7).
.It "uda%d: unit %d not configured, message ignored"
The named disk drive has announced its presence to the controller,
but was not, or cannot now be, configured into the running system.
.Em Message
is one of `available attention' (an `I am here' message) or
`stray response op 0x%x status 0x%x' (anything else).
.It "Emulex SC41/MS screwup: uda%d, got %d correct, then changed 0x%x to 0x%x"
You turned on
.Dv AVOID_EMULEX_BUG ,
and the driver successfully
avoided the bug.
The number of correctly handled requests is
reported, along with the expected and actual values relating to
the bug being avoided.
.It "panic: unrecoverable Emulex screwup"
You turned on
.Dv AVOID_EMULEX_BUG ,
but Emulex was too clever and
avoided the avoidance.
Try turning on
.Dv MSCP_PARANOIA
instead.
.It "uda%d: bad response packet ignored"
You turned on
.Dv MSCP_PARANOIA ,
and the driver caught the controller in
a lie.
The lie has been ignored, and the controller will soon be
reset (after a `lost' interrupt).
This is followed by a hex dump of the offending packet.
.It "uda%d: %s error datagram"
The controller has reported some kind of error, either `hard'
(unrecoverable) or `soft' (recoverable).
If the controller is going on
(attempting to fix the problem), this message includes the remark
`(continuing)'.
Emulex controllers wrongly claim that all soft errors
are hard errors.
This message may be followed by
one of the following 5 messages, depending on its type, and will always
be followed by a failure detail message (also listed below).
.Bd -filled -offset indent
.It memory addr 0x%x
A host memory access error; this is the address that could not be
read.
.It "unit %d: level %d retry %d, %s %d"
A typical disk error; the retry count and error recovery levels are
printed, along with the block type (`lbn', or logical block; or `rbn',
or replacement block) and number.
If the string is something else,
.Tn DEC
has been clever, or your hardware has gone to Australia for vacation
(unless you live there; then it might be in New Zealand, or Brazil).
.It unit %d: %s %d
Also a disk error, but an `SDI' error, whatever that is.
.Po
I doubt it has anything to do with Ronald Reagan.
.Pc
This lists the block type (`lbn' or `rbn') and number.
This is followed by a second
message indicating a microprocessor error code and a front panel code.
These latter codes are drive-specific, and are intended to
be used by field service as an aid in locating failing hardware.
The codes for RA81s can be found in the
.%T RA81 Maintenance Guide ,
DEC order number AA-M879A-TC, in appendices E and F.
.It "unit %d: small disk error, cyl %d"
Yet another kind of disk error, but for small disks.
.Po
``That's what it says, guv'nor. Dunnask me what it means.''
.Pc
.It "unit %d: unknown error, format 0x%x"
A mysterious error: the given format code is not known.
.Ed
.Pp
The detail messages are as follows:
.Bd -filled -offset indent
.It success (%s) (code 0, subcode %d)
Everything worked, but the controller thought it would let you know
that something went wrong.
No matter what subcode, this can probably
be ignored.
.It "invalid command (%s) (code 1, subcode %d)"
This probably cannot occur unless the hardware is out; %s should be
`invalid msg length', meaning some command was too short or too long.
.It "command aborted (unknown subcode) (code 2, subcode %d)"
This should never occur, as the driver never aborts commands.
.It "unit offline (%s) (code 3, subcode %d)"
The drive is offline, either because it is not around (`unknown
drive'), stopped (`not mounted'), out of order (`inoperative'), has the
same unit number as some other drive (`duplicate'), or has been
disabled for diagnostics (`in diagnosis').
.It "unit available (unknown subcode) (code 4, subcode %d)"
The controller has decided to report a perfectly normal event as
an error.
(Why?)
.It "media format error (%s) (code 5, subcode %d)"
The drive cannot be used without reformatting.
The Format Control
Table cannot be read (`fct unread - edc'), there is a bad sector
header (`invalid sector header'), the drive is not set for 512-byte
sectors (`not 512 sectors'), the drive is not formatted (`not formatted'),
or the
.Tn FCT
has an uncorrectable
.Tn ECC
error (`fct ecc').
.It "write protected (%s) (code 6, subcode %d)"
The drive is write protected, either by the front panel switch
(`hardware') or via the driver (`software').
The driver never sets software write protect.
.It "compare error (unknown subcode) (code 7, subcode %d)"
A compare operation showed some sort of difference.
The driver never uses compare operations.
.It "data error (%s) (code 7, subcode %d)"
Something went wrong reading or writing a data sector.
A `forced
error' is a software-asserted error used to mark a sector that contains
suspect data.
Rewriting the sector will clear the forced error.
This is normally set only during bad block replacement, and the driver does
no bad block replacement, so these should not occur.
A `header compare' error probably means the block is shot.
A `sync timeout' presumably has something to do with sector synchronisation.
An `uncorrectable ecc' error is an ordinary data error that cannot
be fixed via
.Tn ECC
logic.
A `%d symbol ecc' error is a data error
that can be (and presumably has been) corrected by the
.Tn ECC
logic.
It might indicate a sector that is imperfect but usable, or that
is starting to go bad.
If any of these errors recur, the sector
may need to be replaced.
.It "host buffer access error (%s) (code %d, subcode %d)"
Something went wrong while trying to copy data to or from the host
(Vax).
The subcode is one of `odd xfer addr', `odd xfer count',
`non-exist. memory', or `memory parity'.
The first two could be a
software glitch; the last two indicate hardware problems.
.It controller error (%s) (code %d, subcode %d)
The controller has detected a hardware error in itself.
A `serdes overrun' is a serialiser / deserialiser overrun; `edc'
probably stands for `error detection code'; and `inconsistent
internal data struct' is obvious.
.It "drive error (%s) (code %d, subcode %d)"
Either the controller or the drive has detected a hardware error
in the drive.
I am not sure what an `sdi command timeout' is, but
these seem to occur benignly on occasion.
A `ctlr detected protocol'
error means that the controller and drive do not agree on a protocol;
this could be a cabling problem, or a version mismatch.
A `positioner'
error means the drive seek hardware is ailing; `lost rd/wr ready'
means the drive read/write logic is sick; and `drive clock dropout'
means that the drive clock logic is bad, or the media is hopelessly
scrambled.
I have no idea what `lost recvr ready' means.
A `drive detected error' is a catch-all for drive hardware trouble; `ctlr
detected pulse or parity' errors are often caused by cabling problems.
.Ed
.El
.Sh SEE ALSO
.Xr intro 4 ,
.Xr mscpbus 4 ,
.Xr uba 4 ,
.Xr disklabel 5 ,
.Xr disklabel 8
.Sh HISTORY
The
.Nm
driver appeared in
.Bx 4.2 .
|