1 .\" $NetBSD: fdc.4,v 1.12 2003/06/27 18:28:32 wiz Exp $
3 .\" Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
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.
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.
35 .Nd NEC 765 floppy disk controller driver
37 .Cd "fdc0 at isa? port 0x3f0 irq 6 drq 2"
39 .Cd "fdc* at pnpbios? index ?"
40 .Cd "fd* at fdc? drive ?"
44 driver provides support for the NEC 765 floppy disk controller and
45 floppy disk drives, commonly found on IBM-PC compatible systems.
47 The driver supports the following floppy diskette formats by using
48 particular 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)
60 selects the default format for the attached floppy drive, as determined
61 by the BIOS configuration for the diskette drive.
63 The driver supports floppy disk formatting using the interfaces in
65 .Bl -tag -width FDIOCFORMAT_TRACK -compact
66 .It Dv FDIOCGETFORMAT Fa struct fdformat_parms
67 Fetch current formatting parameters. This gets the default parameters
68 for the open device if no parameters have been set during the session.
69 .It Dv FDIOCSETFORMAT Fa struct fdformat_parms
70 Set formatting parameters.
71 The driver saves this state and it persists while the device is open.
72 .It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
73 Format a track on the medium.
76 the track formatting parameters were out of range for the medium.
79 there was a medium error while formatting the track.
80 .It Dv FDIOCSETOPTS Fa int
81 Set driver options which persist until the device is closed. The
82 options should be the logical OR of the desired values below:
83 .Bl -tag -width FDOPT_NORETRY -compact
85 Do not retry operations on failure
87 Do not print error messages to the console
89 .It Dv FDIOCGETOPTS Fa int
93 A typical use of the formatting facilities would be to open the device,
96 to fetch the current format parameters, perhaps
97 change a parameter or two, display the formatting details to the user,
100 followed by a series of calls to
101 .Dv FDIOCFORMAT_TRACK .
110 formatting support appeared in