1.\" $NetBSD: rf.4,v 1.4 2009/03/23 16:10:03 joerg Exp $ 2.\" Copyright (c) 2002 Jochen Kunz. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of Jochen Kunz may not be used to endorse or promote 14.\" products derived from this software without specific prior 15.\" written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY JOCHEN KUNZ 18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JOCHEN KUNZ 21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" POSSIBILITY OF SUCH DAMAGE. 28.Dd March 23, 2003 29.Dt RF 4 vax 30.Os 31.Sh NAME 32.Nm rf 33.Nd 34.Tn DEC RX01 / RX02 35floppy disk interface 36.Sh SYNOPSIS 37.Cd "rfc0 at uba? csr 0177170 # RX01/RX02 controller" 38.Cd "rf* at rfc? drive? # RX01/RX02 floppy disk drive" 39.Sh DESCRIPTION 40The 41.Nm rf 42device provides access to 43.Tn DEC 44.Tn RX01 45and 46.Tn RX02 47floppy disk drives and clones thereof. 48These drives use preformatted 8" single sided, soft sectored media. 49The 50.Tn RX01 51and 52.Tn RX02 53drives use a geometry of 77 cylinders, one head and 26 sectors. 54Each sector contains 128 bytes in case of single density ( 55.Tn RX01 56and 57.Tn RX02 58in 59.Tn RX01 60mode) or 256 bytes in double density mode. 61As 62.Nx 63is not able to handle non-512 byte media the driver translates this 64to a geometry of 50 cylinders, one head and 10 sectors in single 65density and 77 cylinders, one head and 13 sectors in double density 66mode. 67While the later matches the total number of sectors, the fake 68geometry in single density does not cover the last two physical 69sectors exact, but it is possible to access this sectors at 512 70byte LBN 501. 71When a 512 byte block is written to LBN 501 the last 256 bytes are ignored. 72When this 512 byte block is read the last 256 bytes contain undefined data. 73.Pp 74This driver supports three minor devices corresponding to the slices: 75.Pp 76.Bl -column Slice -offset indent 77.It Sy Slice Description 78.It a Single density only mode. 79.It b Double density only mode. 80.It c Density autodetect. 81.El 82.Pp 83As the 84.Tn RX01 85and 86.Tn RX02 87hardware is not able to support formatting a blank disk, this driver has 88no support for according IOCTLs. 89But there are clones from third party vendors that support formatting. 90Formatting a blank disk may be initiated 91by the following commands on the VAX chevron prompt: 92.Pp 93.Bl -column Otherx -offset indent 94.It Single density 95.It d/p/w 20001E78 9 96.It d/p/w 20001E7A 92 97.El 98.Pp 99.Bl -column Otherx -offset indent 100.It Double density 101.It d/p/w 20001E78 109 102.It d/p/w 20001E7A 92 103.El 104.Sh FILES 105.Bl -tag -width /dev/rx?xx -compact 106.It Pa /dev/rf?[abc] 107.It Pa /dev/rrf?[abc] 108.El 109.Sh DIAGNOSTICS 110.Bl -diag 111.It "rfc_attach: Error creating bus_dma map: %d" 112.It "did not respond to INIT CMD" 113Possible errors during 114.Xr autoconf 4 . 115%d is the return code of 116.Xr bus_dmamap_create 9 . 117.It "%s: did not respond to CMD %x" 118An error occurred while the driver tried to send command %x to drive %s. 119.It "rfc_intr: Error while reading sector: %x" 120.It "rfc_intr: Error while writing sector: %x" 121.It "rfc_intr: Error while DMA: %x" 122%x is status code from the controller error and status register. 123.It "rfc_intr: Error while loading bus_dma map: %d" 124%d is return code of 125.Xr bus_dmamap_load 9 . 126.It "%s: density error." 127A single density disk was opened in double density only mode or vice 128versa or the medium in the drive attached as %s was not readable at all. 129.El 130.Sh SEE ALSO 131.Xr dd 1 , 132.Xr tar 1 , 133.Xr intro 4 , 134.Xr disklabel 5 , 135.Xr disklabel 8 , 136.Xr mknod 8 , 137.Xr mount 8 , 138.Xr newfs 8 139.Sh HISTORY 140The rf driver appeared in 141.Nx 2.0 . 142It is a complete rewrite, not related to the old 4.2BSD 143.Nm rx 144driver. 145.Sh AUTHORS 146.An Jochen Kunz 147.Sh BUGS 148Writing of a 149.Xr disklabel 5 150is not supported. 151The driver return always the internally fake disklabel. 152