xref: /original-bsd/share/man/man4/man4.vax/rx.4 (revision c3e32dec)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)rx.4	8.1 (Berkeley) 06/05/93
7.\"
8.Dd
9.Dt RX 4 vax
10.Os BSD 4.2
11.Sh NAME
12.Nm rx
13.Nd
14.Tn DEC
15.Tn RX02
16floppy disk interface
17.Sh SYNOPSIS
18.Cd "controller fx0 at uba0 csr 0177170  vector rxintr"
19.Cd "disk rx0 at fx0 drive 0"
20.Cd "disk rx1 at fx0 drive 1"
21.Sh DESCRIPTION
22The
23.Nm rx
24device provides access to a
25.Tn DEC
26.Tn RX02
27floppy disk
28unit with M8256 interface module
29.Pf ( Tn RX211
30configuration).
31The
32.Tn RX02
33uses 8-inch, single-sided, soft-sectored floppy
34disks (with pre-formatted industry-standard headers) in
35either single or double density.
36.Pp
37Floppy disks handled by the
38.Tn RX02
39contain 77 tracks, each with 26
40sectors (for a total of 2,002 sectors).  The sector size is 128
41bytes for single density, 256 bytes for double density.  Single
42density disks are compatible with the
43.Tn RX01
44floppy disk unit and with
45.Tn IBM
463740 Series Diskette 1 systems.
47.Pp
48In addition to normal (`block' and `raw')
49.Tn I/O ,
50the driver supports
51formatting of disks for either density and
52the ability to invoke a 2 for 1 interleaved sector mapping
53compatible with the
54.Tn DEC
55operating system
56.Tn RT-11 .
57.Pp
58The minor device number is interpreted as follows:
59.Pp
60.Bl -column Otherx -offset indent
61.Sy Bit	Description
620	Sector interleaving  (1 disables interleaving)
631	Logical sector 1 is on track 1 (0 no, 1 yes)
642	Not used, reserved
65Other	Drive number
66.El
67.Pp
68The two drives in a single
69.Tn RX02
70unit are treated as
71two disks attached to a single controller.  Thus, if there are two
72.Tn RX02 Ns 's
73on a system, the drives on the first
74.Tn RX02
75are
76.Dq Li rx0
77and
78.Dq Li rx1 ,
79while the drives on the second are
80.Dq Li rx2
81and
82.Dq Li rx3 .
83.Pp
84When the device is opened, the density of the disk
85currently in the drive is automatically determined. If there
86is no floppy in the device, open will fail.
87.Pp
88The interleaving parameters are represented in raw device
89names by the letters
90.Ql a
91through
92.Ql d .
93Thus, unit 0, drive 0 is
94called by one of the following names:
95.Pp
96.Bl -column interleavedxx "Device namexx" "Starting Track" -offset indent
97.Sy Mapping	Device name	Starting track
98interleaved	/dev/rrx0a	0
99direct	/dev/rrx0b	0
100interleaved	/dev/rrx0c	1
101direct	/dev/rrx0d	1
102.El
103.Pp
104The mapping used on the
105.Ql c
106device is compatible with the
107.Tn DEC
108operating system
109.Tn RT-11 .
110The
111.Ql b
112device accesses the
113sectors of the disk in strictly sequential order.
114The
115.Ql a
116device is the most efficient for disk-to-disk copying.
117This mapping is always used by the block device.
118.Pp
119.Tn I/O
120requests must start on a sector boundary, involve an integral
121number of complete sectors, and not go off the end of the disk.
122.Sh NOTES
123Even though the storage capacity on a floppy disk is quite
124small, it is possible to make filesystems on
125double density disks.
126For example, the command
127.Bd -literal -offset indent
128% mkfs /dev/rx0 1001 13 1 4096 512 32 0 4
129.Ed
130.Pp
131makes a file system on the double density disk in rx0 with
132436 kbytes available for file storage.
133Using
134.Xr tar 1
135gives a more efficient utilization of the available
136space for file storage.
137Single density diskettes do not provide sufficient storage capacity to
138hold file systems.
139.Pp
140A number of
141.Xr ioctl 2
142calls apply to the rx devices, and
143have the form
144.Bd -literal -offset indent
145#include <vaxuba/rxreg.h>
146ioctl(fildes, code, arg)
147int *arg;
148.Ed
149.Pp
150The applicable codes are:
151.Bl -tag -width RXIOC_GETDENS
152.It Dv RXIOC_FORMAT
153Format the diskette. The density to use is specified
154by the
155.Ar arg
156argument, zero gives single density while non-zero
157gives double density.
158.It Dv RXIOC_GETDENS
159Return the density of the diskette (zero or non-zero as above).
160.It Dv RXIOC_WDDMK
161On the next write, include a
162.Em deleted data address mark
163in
164the header of the first sector.
165.It Dv RXIOC_RDDMK
166Return non-zero if the last sector read contained a
167.Em deleted data address mark
168in its header, otherwise
169return 0.
170.El
171.Sh FILES
172.Bl -tag -width /dev/rx?xx -compact
173.It Pa /dev/rx?
174.It Pa /dev/rrx?[a-d]
175.El
176.Sh DIAGNOSTICS
177.Bl -diag
178.It "rx%d: hard error, trk %d psec %d cs=%b, db=%b, err=%x, %x, %x, %x."
179An unrecoverable error was encountered.  The
180track and physical sector numbers, the device registers and the
181extended error status are displayed.
182.Pp
183.It rx%d: state %d (reset).
184The driver entered a bogus state.  This should not happen.
185.El
186.Sh ERRORS
187The following errors may be returned by the driver:
188.Bl -tag -width [ENODEV]
189.It Bq Er ENODEV
190Drive not ready; usually because no disk is in the drive or
191the drive door is open.
192.It Bq Er ENXIO
193Nonexistent drive (on open);
194offset is too large or not on a sector boundary or
195byte count is not a multiple of the sector size (on read or write);
196or bad (undefined) ioctl code.
197.It Bq Er EIO
198A physical error other than ``not ready'', probably bad media or
199unknown format.
200.It Bq Er EBUSY
201Drive has been opened for exclusive access.
202.It Bq Er EBADF
203No write access (on format), or wrong density; the latter
204can only happen if the disk is changed without
205.Em closing
206the device
207(i.e., calling
208.Xr close 2 ) .
209.El
210.Sh SEE ALSO
211.Xr rxformat 8 ,
212.Xr newfs 8 ,
213.Xr mkfs 8 ,
214.Xr tar 1 ,
215.Xr arff 8
216.Sh HISTORY
217The
218.Nm
219driver appeared in
220.Bx 4.2 .
221.Sh BUGS
222A floppy may not be formatted if the
223header info on sector 1, track 0 has been damaged.  Hence, it is not
224possible to format completely degaussed disks or disks with other
225formats than the two known by the hardware.
226.Pp
227If the drive subsystem is powered down when the machine is booted, the
228controller won't interrupt.
229