1.\" $NetBSD: rf.4,v 1.7 2017/08/01 11:11:17 wiz 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 February 17, 2017 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.Bl -column Slice -offset indent 76.It Sy Slice Description 77.It a Single density only mode. 78.It b Double density only mode. 79.It c Density autodetect. 80.El 81As the 82.Tn RX01 83and 84.Tn RX02 85hardware is not able to support formatting a blank disk, this driver has 86no support for according IOCTLs. 87But there are clones from third party vendors that support formatting. 88Formatting a blank disk may be initiated 89by the following commands on the VAX chevron prompt: 90.Bl -column Otherx -offset indent 91.It Single density 92.It d/p/w 20001E78 9 93.It d/p/w 20001E7A 92 94.El 95.Bl -column Otherx -offset indent 96.It Double density 97.It d/p/w 20001E78 109 98.It d/p/w 20001E7A 92 99.El 100.Sh FILES 101.Bl -tag -width /dev/rx?xx -compact 102.It Pa /dev/rf?[abc] 103.It Pa /dev/rrf?[abc] 104.El 105.Sh DIAGNOSTICS 106.Bl -diag 107.It "rfc_attach: Error creating bus_dma map: %d" 108.It "did not respond to INIT CMD" 109Possible errors during 110.Xr vax/autoconf 4 . 111%d is the return code of 112.Xr bus_dmamap_create 9 . 113.It "%s: did not respond to CMD %x" 114An error occurred while the driver tried to send command %x to drive %s. 115.It "rfc_intr: Error while reading sector: %x" 116.It "rfc_intr: Error while writing sector: %x" 117.It "rfc_intr: Error while DMA: %x" 118%x is status code from the controller error and status register. 119.It "rfc_intr: Error while loading bus_dma map: %d" 120%d is return code of 121.Xr bus_dmamap_load 9 . 122.It "%s: density error." 123A single density disk was opened in double density only mode or vice 124versa or the medium in the drive attached as %s was not readable at all. 125.El 126.Sh SEE ALSO 127.Xr dd 1 , 128.Xr tar 1 , 129.Xr vax/intro 4 , 130.Xr disklabel 5 , 131.Xr disklabel 8 , 132.Xr mknod 8 , 133.Xr mount 8 , 134.Xr newfs 8 135.Sh HISTORY 136The rf driver appeared in 137.Nx 2.0 . 138It is a complete rewrite, not related to the old 4.2BSD 139.Nm rx 140driver. 141.Sh AUTHORS 142.An Jochen Kunz 143.Sh BUGS 144Writing of a 145.Xr disklabel 5 146is not supported. 147The driver return always the internally fake disklabel. 148