up | Inhaltsverzeichniss | Kommentar

Manual page for FD(4S)

fd - disk driver for Floppy Disk Controllers

CONFIG -- Sun386i SYSTEMS

controller fdc0 at atmem ? csr 0x1000 dmachan 2 irq 6 priority 2
disk fd0 at fdc0 drive 0 flags 0

CONFIG -- SUN-3/80 SYSTEMS

controller fdc0 at obio ? csr 0x6e000000 priority 6 vector fdintr 0x5c
disk fd0 at fdc0 drive 0 flags 0

CONFIG -- Desktop SPARCsystems

device-driver fd

AVAILABILITY

Sun386i, Sun-3/80, and Desktop SPARCsystems only.

DESCRIPTION

The fd driver provides an interface to floppy disks using the Intel 82072 disk controller on Sun386i, Sun-3/80 and Desktop SPARCsystems.

The minor device number in files that use the floppy interface encodes the unit number as well as the partition. The bits of the minor device number are defined as rrruuppp where r=reserved, u=unit, and p=partition. The unit number selects a particular floppy drive for the controller. The partition number picks one of eight partitions [a-h].

When the floppy is first opened the driver looks for a label in logical block 0 of the diskette. If a label is found, the geometry and partition information from the label will be used on each access thereafter. The driver first assumes high density characteristics when it tries to read the label. If the read fails it will try the read again using low density characteristics. If both attempts to read the label fail, the open will fail. Use the FNDELAY flag when opening an unformatted diskette as a signal to the driver that it should not attempt to access the diskette. If block 0 is read successfully, but a label is not found, the open will fail for the block interface. Using the raw interface, the open will succeed even if the diskette is unlabeled. Default geometry and partitioning are assumed if the diskette is unlabeled.

The default partitions are:

a
-> 0, N-1
b
-> N-1, N
c
-> 0, N
where N is the number of cylinders on the diskette.

The fd driver supports both block and raw interfaces. The block files access the disk using the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ``raw'' interface that provides for direct transmission between the disk and the user's read or write buffer. A single read.2v or write.2v call usually results in one I/O operation; therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw files conventionally begin with an extra `r'.

FILES -- Sun386i SYSTEMS

1.44 MB Floppy Disk Drives:

/dev/fd0a
block file
/dev/fd0c
block file
/dev/rfd0a
raw file
/dev/rfd0c
raw file

720 K Floppy Disk Drives:

/dev/fdl0a
block file
/dev/fdl0c
block file
/dev/rfdl0a
raw file
/dev/rfdl0c
raw file

FILES -- SUN-3/80 and Desktop SPARCsystems

Note: the fd driver on Sun-3/80 and Desktop SPARCsystems auto-senses the density of the floppy.

/dev/fd0[a-c]
block file
/dev/fd0
block file (same as /dev/fd0c)
/dev/rfd0[a-c]
raw file
/dev/rfd0
raw file (same as /dev/rfd0c)

SEE ALSO

read.2v write.2v dkio.4s

DIAGNOSTICS -- Sun386i SYSTEMS

fd drv %d, trk %d: %s
A command such as read or write encountered a format-related error condition. The value of %s is derived from the error number given by the controller, indicating the nature of the error. The track number is relative to the beginning of the partition involved.
fd drv %d, blk %d: %s
A command such as read or write encountered an error condition related to I/O. The value of %s is derived from the error number returned by the controller and indicates the nature of the error. The block number is relative to the start of the partition involved.
fd controller: %s
An error occurred in the controller. The value of %s is derived from the status returned by the controller and specifies the error encountered.
fd(%d):%s please insert
I/O was attempted while the floppy drive door was not latched. The value of %s indicates which disk was expected to be in the drive.

DIAGNOSTICS -- SUN-3/80 and Desktop SPARCsystems

fd%d: %s failed (%x %x %x)
The command, %s, failed after several retries on drive %d. The three hex values in parenthesis are the contents of status register 0, status register 1, and status register 2 of the Intel 82072 Floppy Disk Controller on completion of the command as documented in the data sheet for that part. This error message is usually followed by one of the following, interpreting the bits of the status register:
fd%d: not writable
fd%d: crc error
fd%d: overrun/underrun
fd%d: bad format
fd%d: timeout

NOTES

Floppy diskettes have 18 sectors per track, and can cross a track (though not a cylinder) boundary without lossing data, so when using dd.1 to or from a diskette, you should specify bs=18k or multiples thereof.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97