xref: /netbsd-src/share/man/man4/man4.x86/fdc.4 (revision bb5956aa499e6a8d2a451bd6b067653d52be3296)
1.\"   $NetBSD: fdc.4,v 1.1 2011/09/23 14:45:06 jruoho Exp $
2.\"
3.\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by John Kohl.
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 September 23, 2011
31.Dt FDC 4 x86
32.Os
33.Sh NAME
34.Nm fdc
35.Nd NEC 765 floppy disk controller driver
36.Sh SYNOPSIS
37.Cd "fdc0 at isa? port 0x3f0 irq 6 drq 2"
38.Cd "fdc* at acpi?"
39.Cd "fdc* at pnpbios? index ?"
40.Cd "fd*  at fdc? drive ?"
41.Sh DESCRIPTION
42The
43.Nm
44driver provides support for the NEC 765 floppy disk controller and
45floppy disk drives, commonly found on IBM-PC compatible systems.
46.Pp
47The driver supports the following floppy diskette formats by using
48particular partitions:
49.Bl -tag -width xxxx -offset indent -compact
50.It 1.44MB 3.5-inch (b)
51.It "1.2MB " 5.25-inch (c)
52.It "360KB " 5.25-inch (1.2MB drive) (d)
53.It "360KB " 5.25-inch (IBM-PC drive) (e)
54.It "720KB " 3.5-inch (f)
55.It "720KB " 5.25-inch (g)
56.It "360KB " 3.5-inch (h)
57.El
58Partition
59.Ar a
60selects the default format for the attached floppy drive, as determined
61by the BIOS configuration for the diskette drive.
62.Sh FORMATTING
63The driver supports floppy disk formatting using the interfaces in
64.In sys/fdio.h :
65.Bl -tag -width FDIOCFORMAT_TRACK -compact
66.It Dv FDIOCGETFORMAT Fa struct fdformat_parms
67Fetch current formatting parameters.
68This gets the default parameters
69for the open device if no parameters have been set during the session.
70.It Dv FDIOCSETFORMAT Fa struct fdformat_parms
71Set formatting parameters.
72The driver saves this state and it persists while the device is open.
73.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
74Format a track on the medium.
75If this call returns
76.Er EINVAL ,
77the track formatting parameters were out of range for the medium.
78If it returns
79.Er EIO ,
80there was a medium error while formatting the track.
81.It Dv FDIOCSETOPTS Fa int
82Set driver options which persist until the device is closed.
83The options should be the logical OR of the desired values below:
84.Bl -tag -width FDOPT_NORETRY -compact
85.It Dv FDOPT_NORETRY
86Do not retry operations on failure
87.It Dv FDOPT_SILENT
88Do not print error messages to the console
89.El
90.It Dv FDIOCGETOPTS Fa int
91Fetch drive options.
92.El
93.Pp
94A typical use of the formatting facilities would be to open the device,
95call
96.Dv FDIOCGETFORMAT
97to fetch the current format parameters, perhaps
98change a parameter or two, display the formatting details to the user,
99and then call
100.Dv FDIOCSETFORMAT
101followed by a series of calls to
102.Dv FDIOCFORMAT_TRACK .
103.Sh SEE ALSO
104.Xr fdformat 1 ,
105.Xr acpi 4 ,
106.Xr isa 4 ,
107.Xr pnpbios 4
108.Sh HISTORY
109The
110.Nm
111formatting support appeared in
112.Nx 1.3 .
113