NetBSD-5.0.2/share/man/man4/man4.sparc64/fdc.4

Compare this file to the similar file:
Show the results in this format:

.\"	$NetBSD: fdc.4,v 1.2 2008/04/30 13:10:56 martin Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Paul Kranenburg.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 8, 2007
.Dt FD 4 sparc64
.Os
.Sh NAME
.Nm fdc
.Nd Sun SPARCstation i82072 or i82077 floppy disk controller driver
.Sh SYNOPSIS
.Cd "fdc0 at sbus0" Pq SBus based machines
.Cd "fdc0 at ebus0" Pq PCI based machines
.Cd "fd* at fdc0"
.Sh DESCRIPTION
This is the driver for the built-in floppy disk drive run by the
.Tn Intel
i82072 or i82077 controller chip found on the SPARCstation desktop
systems, and other
.Tn SPARC
systems.
.Pp
Bits
.Bq 0-3
of the minor device number of the special files referring to this
device encode the floppy density as follows:
.Bl -tag -width indent -offset indent
.It 0
3.5'' 1.44MB floppy diskettes.
.It 1
3.5'' 720KB floppy diskettes.
.It 2
3.5'' 360KB floppy diskettes.
.It 3
3.5'' 1.2MB/NEC Japanese format floppy diskettes.
.El
.Sh FORMATTING
The driver supports floppy disk formatting using the interfaces in
.Aq Pa sys/fdio.h :
.Pp
.Bl -tag -width FDIOCFORMAT_TRACK -compact
.It Dv FDIOCGETFORMAT Fa struct fdformat_parms
Fetch current formatting parameters.
This gets the default parameters
for the open device if no parameters have been set during the session.
.Pp
.It Dv FDIOCSETFORMAT Fa struct fdformat_parms
Set formatting parameters.
The driver saves this state and it persists while the device is open.
.Pp
.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
Format a track on the medium.
If this call returns
.Er EINVAL ,
the track formatting parameters were out of range for the medium.
If it returns
.Er EIO ,
there was a medium error while formatting the track.
.Pp
.It Dv FDIOCSETOPTS Fa int
Set driver options which persist until the device is closed.
The
options should be the logical OR of the desired values below:
.Pp
.Bl -tag -width FDOPT_NORETRY -compact
.It Dv FDOPT_NORETRY
Do not retry operations on failure
.It Dv FDOPT_SILENT
Do not print error messages to the console
.El
.Pp
.It Dv FDIOCGETOPTS Fa int
Fetch drive options.
.El
.Pp
A typical use of the formatting facilities would be to open the device,
call
.Dv FDIOCGETFORMAT
to fetch the current format parameters, perhaps
change a parameter or two, display the formatting details to the user,
and then call
.Dv FDIOCSETFORMAT
followed by a series of calls to
.Dv FDIOCFORMAT_TRACK .
.Sh SEE ALSO
.Xr eject 1 ,
.Xr fdformat 1
.Sh HISTORY
The
.Nm
driver first appeared in
.Nx 4.0 .
.Sh BUGS
The ebus attachment does not yet work.