1.\" $NetBSD: fdc.4,v 1.3 2010/03/22 18:58:31 joerg Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Paul Kranenburg. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd May 8, 2007 31.Dt FD 4 sparc64 32.Os 33.Sh NAME 34.Nm fdc 35.Nd Sun SPARCstation i82072 or i82077 floppy disk controller driver 36.Sh SYNOPSIS 37.Cd "fdc0 at sbus0" Pq SBus based machines 38.Cd "fdc0 at ebus0" Pq PCI based machines 39.Cd "fd* at fdc0" 40.Sh DESCRIPTION 41This is the driver for the built-in floppy disk drive run by the 42.Tn Intel 43i82072 or i82077 controller chip found on the SPARCstation desktop 44systems, and other 45.Tn SPARC 46systems. 47.Pp 48Bits 49.Bq 0-3 50of the minor device number of the special files referring to this 51device encode the floppy density as follows: 52.Bl -tag -width indent -offset indent 53.It 0 543.5'' 1.44MB floppy diskettes. 55.It 1 563.5'' 720KB floppy diskettes. 57.It 2 583.5'' 360KB floppy diskettes. 59.It 3 603.5'' 1.2MB/NEC Japanese format floppy diskettes. 61.El 62.Sh FORMATTING 63The driver supports floppy disk formatting using the interfaces in 64.In sys/fdio.h : 65.Pp 66.Bl -tag -width FDIOCFORMAT_TRACK -compact 67.It Dv FDIOCGETFORMAT Fa struct fdformat_parms 68Fetch current formatting parameters. 69This gets the default parameters 70for the open device if no parameters have been set during the session. 71.Pp 72.It Dv FDIOCSETFORMAT Fa struct fdformat_parms 73Set formatting parameters. 74The driver saves this state and it persists while the device is open. 75.Pp 76.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd 77Format a track on the medium. 78If this call returns 79.Er EINVAL , 80the track formatting parameters were out of range for the medium. 81If it returns 82.Er EIO , 83there was a medium error while formatting the track. 84.Pp 85.It Dv FDIOCSETOPTS Fa int 86Set driver options which persist until the device is closed. 87The 88options should be the logical OR of the desired values below: 89.Pp 90.Bl -tag -width FDOPT_NORETRY -compact 91.It Dv FDOPT_NORETRY 92Do not retry operations on failure 93.It Dv FDOPT_SILENT 94Do not print error messages to the console 95.El 96.Pp 97.It Dv FDIOCGETOPTS Fa int 98Fetch drive options. 99.El 100.Pp 101A typical use of the formatting facilities would be to open the device, 102call 103.Dv FDIOCGETFORMAT 104to fetch the current format parameters, perhaps 105change a parameter or two, display the formatting details to the user, 106and then call 107.Dv FDIOCSETFORMAT 108followed by a series of calls to 109.Dv FDIOCFORMAT_TRACK . 110.Sh SEE ALSO 111.Xr eject 1 , 112.Xr fdformat 1 113.Sh HISTORY 114The 115.Nm 116driver first appeared in 117.Nx 4.0 . 118.Sh BUGS 119The ebus attachment does not yet work. 120