xref: /csrg-svn/share/man/man4/man4.vax/rx.4 (revision 47674)
1*47674Scael.\" Copyright (c) 1983, 1991 Regents of the University of California.
2*47674Scael.\" All rights reserved.
320742Smckusick.\"
4*47674Scael.\" %sccs.include.redist.man%
520742Smckusick.\"
6*47674Scael.\"     @(#)rx.4	6.2 (Berkeley) 03/27/91
7*47674Scael.\"
8*47674Scael.Dd
9*47674Scael.Dt RX 4 vax
10*47674Scael.Os BSD 4.2
11*47674Scael.Sh NAME
12*47674Scael.Nm rx
13*47674Scael.Nd
14*47674Scael.Tn DEC
15*47674Scael.Tn RX02
16*47674Scaelfloppy disk interface
17*47674Scael.Sh SYNOPSIS
18*47674Scael.Cd "controller fx0 at uba0 csr 0177170  vector rxintr"
19*47674Scael.Cd "disk rx0 at fx0 drive 0"
20*47674Scael.Cd "disk rx1 at fx0 drive 1"
21*47674Scael.Sh DESCRIPTION
2220742SmckusickThe
23*47674Scael.Nm rx
24*47674Scaeldevice provides access to a
25*47674Scael.Tn DEC
26*47674Scael.Tn RX02
27*47674Scaelfloppy disk
28*47674Scaelunit with M8256 interface module
29*47674Scael.Pf ( Tn RX211
30*47674Scaelconfiguration).
31*47674ScaelThe
32*47674Scael.Tn RX02
33*47674Scaeluses 8-inch, single-sided, soft-sectored floppy
3420742Smckusickdisks (with pre-formatted industry-standard headers) in
3520742Smckusickeither single or double density.
36*47674Scael.Pp
37*47674ScaelFloppy disks handled by the
38*47674Scael.Tn RX02
39*47674Scaelcontain 77 tracks, each with 26
4020742Smckusicksectors (for a total of 2,002 sectors).  The sector size is 128
4120742Smckusickbytes for single density, 256 bytes for double density.  Single
42*47674Scaeldensity disks are compatible with the
43*47674Scael.Tn RX01
44*47674Scaelfloppy disk unit and with
45*47674Scael.Tn IBM
46*47674Scael3740 Series Diskette 1 systems.
47*47674Scael.Pp
48*47674ScaelIn addition to normal (`block' and `raw')
49*47674Scael.Tn I/O ,
50*47674Scaelthe driver supports
5120742Smckusickformatting of disks for either density and
5220742Smckusickthe ability to invoke a 2 for 1 interleaved sector mapping
53*47674Scaelcompatible with the
54*47674Scael.Tn DEC
55*47674Scaeloperating system
56*47674Scael.Tn RT-11 .
57*47674Scael.Pp
5820742SmckusickThe minor device number is interpreted as follows:
59*47674Scael.Pp
60*47674Scael.Bl -column Otherx -offset indent
61*47674Scael.Sy Bit	Description
6220742Smckusick0	Sector interleaving  (1 disables interleaving)
6320742Smckusick1	Logical sector 1 is on track 1 (0 no, 1 yes)
6420742Smckusick2	Not used, reserved
6520742SmckusickOther	Drive number
66*47674Scael.El
67*47674Scael.Pp
68*47674ScaelThe two drives in a single
69*47674Scael.Tn RX02
70*47674Scaelunit are treated as
7120742Smckusicktwo disks attached to a single controller.  Thus, if there are two
72*47674Scael.Tn RX02 Ns 's
73*47674Scaelon a system, the drives on the first
74*47674Scael.Tn RX02
75*47674Scaelare
76*47674Scael.Dq Li rx0
77*47674Scaeland
78*47674Scael.Dq Li rx1 ,
79*47674Scaelwhile the drives on the second are
80*47674Scael.Dq Li rx2
81*47674Scaeland
82*47674Scael.Dq Li rx3 .
83*47674Scael.Pp
8420742SmckusickWhen the device is opened, the density of the disk
8520742Smckusickcurrently in the drive is automatically determined. If there
8620742Smckusickis no floppy in the device, open will fail.
87*47674Scael.Pp
8820742SmckusickThe interleaving parameters are represented in raw device
89*47674Scaelnames by the letters
90*47674Scael.Ql a
91*47674Scaelthrough
92*47674Scael.Ql d .
93*47674ScaelThus, unit 0, drive 0 is
9420742Smckusickcalled by one of the following names:
95*47674Scael.Pp
96*47674Scael.Bl -column interleavedxx "Device namexx" "Starting Track" -offset indent
97*47674Scael.Sy Mapping	Device name	Starting track
9820742Smckusickinterleaved	/dev/rrx0a	0
9920742Smckusickdirect	/dev/rrx0b	0
10020742Smckusickinterleaved	/dev/rrx0c	1
10120742Smckusickdirect	/dev/rrx0d	1
102*47674Scael.El
103*47674Scael.Pp
104*47674ScaelThe mapping used on the
105*47674Scael.Ql c
106*47674Scaeldevice is compatible with the
107*47674Scael.Tn DEC
108*47674Scaeloperating system
109*47674Scael.Tn RT-11 .
110*47674ScaelThe
111*47674Scael.Ql b
112*47674Scaeldevice accesses the
11320742Smckusicksectors of the disk in strictly sequential order.
114*47674ScaelThe
115*47674Scael.Ql a
116*47674Scaeldevice is the most efficient for disk-to-disk copying.
11720743SmckusickThis mapping is always used by the block device.
118*47674Scael.Pp
119*47674Scael.Tn I/O
120*47674Scaelrequests must start on a sector boundary, involve an integral
12120742Smckusicknumber of complete sectors, and not go off the end of the disk.
122*47674Scael.Sh NOTES
12320742SmckusickEven though the storage capacity on a floppy disk is quite
12420742Smckusicksmall, it is possible to make filesystems on
12520742Smckusickdouble density disks.
12620742SmckusickFor example, the command
127*47674Scael.Bd -literal -offset indent
12820742Smckusick% mkfs /dev/rx0 1001 13 1 4096 512 32 0 4
129*47674Scael.Ed
130*47674Scael.Pp
13120742Smckusickmakes a file system on the double density disk in rx0 with
13220742Smckusick436 kbytes available for file storage.
133*47674ScaelUsing
134*47674Scael.Xr tar 1
135*47674Scaelgives a more efficient utilization of the available
13620742Smckusickspace for file storage.
13720742SmckusickSingle density diskettes do not provide sufficient storage capacity to
13820742Smckusickhold file systems.
139*47674Scael.Pp
140*47674ScaelA number of
141*47674Scael.Xr ioctl 2
142*47674Scaelcalls apply to the rx devices, and
14320742Smckusickhave the form
144*47674Scael.Bd -literal -offset indent
14520742Smckusick#include <vaxuba/rxreg.h>
14620742Smckusickioctl(fildes, code, arg)
14720742Smckusickint *arg;
148*47674Scael.Ed
149*47674Scael.Pp
15020742SmckusickThe applicable codes are:
151*47674Scael.Bl -tag -width RXIOC_GETDENS
152*47674Scael.It Dv RXIOC_FORMAT
15320742SmckusickFormat the diskette. The density to use is specified
15420742Smckusickby the
155*47674Scael.Ar arg
15620743Smckusickargument, zero gives single density while non-zero
15720742Smckusickgives double density.
158*47674Scael.It Dv RXIOC_GETDENS
15920743SmckusickReturn the density of the diskette (zero or non-zero as above).
160*47674Scael.It Dv RXIOC_WDDMK
161*47674ScaelOn the next write, include a
162*47674Scael.Em deleted data address mark
163*47674Scaelin
16420742Smckusickthe header of the first sector.
165*47674Scael.It Dv RXIOC_RDDMK
16620742SmckusickReturn non-zero if the last sector read contained a
167*47674Scael.Em deleted data address mark
168*47674Scaelin its header, otherwise
16920742Smckusickreturn 0.
170*47674Scael.El
171*47674Scael.Sh FILES
172*47674Scael.Bl -tag -width /dev/rx?xx -compact
173*47674Scael.It Pa /dev/rx?
174*47674Scael.It Pa /dev/rrx?[a-d]
175*47674Scael.El
176*47674Scael.Sh DIAGNOSTICS
177*47674Scael.Bl -diag
178*47674Scael.It "rx%d: hard error, trk %d psec %d cs=%b, db=%b, err=%x, %x, %x, %x."
179*47674ScaelAn unrecoverable error was encountered.  The
180*47674Scaeltrack and physical sector numbers, the device registers and the
181*47674Scaelextended error status are displayed.
182*47674Scael.Pp
183*47674Scael.It rx%d: state %d (reset).
184*47674ScaelThe driver entered a bogus state.  This should not happen.
185*47674Scael.El
186*47674Scael.Sh ERRORS
18720743SmckusickThe following errors may be returned by the driver:
188*47674Scael.Bl -tag -width [ENODEV]
189*47674Scael.It Bq Er ENODEV
19020742SmckusickDrive not ready; usually because no disk is in the drive or
19120742Smckusickthe drive door is open.
192*47674Scael.It Bq Er ENXIO
19320742SmckusickNonexistent drive (on open);
19420742Smckusickoffset is too large or not on a sector boundary or
19520742Smckusickbyte count is not a multiple of the sector size (on read or write);
19620742Smckusickor bad (undefined) ioctl code.
197*47674Scael.It Bq Er EIO
19820742SmckusickA physical error other than ``not ready'', probably bad media or
19920742Smckusickunknown format.
200*47674Scael.It Bq Er EBUSY
20120742SmckusickDrive has been opened for exclusive access.
202*47674Scael.It Bq Er EBADF
20320742SmckusickNo write access (on format), or wrong density; the latter
20420743Smckusickcan only happen if the disk is changed without
205*47674Scael.Em closing
20620743Smckusickthe device
207*47674Scael(i.e., calling
208*47674Scael.Xr close 2 ) .
209*47674Scael.El
210*47674Scael.Sh SEE ALSO
211*47674Scael.Xr rxformat 8 ,
212*47674Scael.Xr newfs 8 ,
213*47674Scael.Xr mkfs 8 ,
214*47674Scael.Xr tar 1 ,
215*47674Scael.Xr arff 8
216*47674Scael.Sh HISTORY
217*47674ScaelThe
218*47674Scael.Nm
219*47674Scaeldriver appeared in
220*47674Scael.Bx 4.2 .
221*47674Scael.Sh BUGS
22220742SmckusickA floppy may not be formatted if the
22320742Smckusickheader info on sector 1, track 0 has been damaged.  Hence, it is not
22420742Smckusickpossible to format completely degaussed disks or disks with other
22520742Smckusickformats than the two known by the hardware.
226*47674Scael.Pp
22720742SmckusickIf the drive subsystem is powered down when the machine is booted, the
22820742Smckusickcontroller won't interrupt.
229