fdc - PC architecture floppy disk controller driver
In /boot/device.hints hint.fdc.0.at=isa hint.fdc.0.port=0x3F0 hint.fdc.0.irq=6 hint.fdc.0.drq=2 hint.fdc.0.flags=0x0 hint.fd.0.at=fdc0 hint.fd.0.drive=0 hint.fd.0.flags=0x0 hint.fd.1.at=fdc0 hint.fd.1.drive=1 hint.fd.1.flags=0x0
Floppy disk controllers can connect up to four drives each. The driver can currently handle up to two drives per controller (or four drives on ACPI). Upon driver initialization, an attempt is made to find out the type of the floppy controller in use. The known controller types are either the original NE765 or i8272 chips, or alternatively enhanced controllers that are compatible with the NE72065 or i82077 chips. These enhanced controllers (among other enhancements) implement a FIFO for floppy data transfers that will automatically be enabled once an enhanced chip has been detected. This FIFO activation can be disabled using the per-controller flags value of 0x1
By default, this driver creates a single device node /dev/fd N for each attached drive with number N For historical reasons, device nodes that use a trailing UFS-style partition letter (ranging from `a' through `h' can also be accessed, which will be implemented as symbolic links to the main device node.
Accessing the main device node will attempt to autodetect the density of the available medium for multi-density devices. Thus it is possible to use either a 720 KB medium or a 1440 KB medium in a high-density 3.5 inch standard floppy drive. Normally, this autodetection will only happen once at the first call to open(2) for the device after inserting the medium. This assumes the drive offers proper changeline support so media changes can be detected by the driver. To indicate a drive that does not have the changeline support, this can be overridden using the per-drive device flags value of 0x10 (causing each call to open(2) to perform the autodetection).
When trying to use a floppy device with special-density media, other device nodes can be created, of the form /dev/fd N . MMMM where N is the drive number, and MMMM is a number between one and four digits describing the device density. Up to 15 additional subdevices per drive can be created that way. The administrator is free to decide on a policy how to assign these numbers. The two common policies are to either implement subdevices numbered 1 through 15, or to use a number that describes the medium density in kilobytes. Initially, each of those devices will be configured to the maximal density that is possible for the drive type (like 1200 KB for 5.25 inch HD drives or 1440 KB for 3.5 inch HD drives). The desired density to be used on that subdevice needs to be configured using fdcontrol(8).
Drive types are configured using the lower four bits of the per-drive device flags. The following values can be specified:
On IA32 architectures, the drive type can be specified as 0 for the drives. In that case, the CMOS configuration memory will be consulted to obtain the value for that drive. The ACPI probe automatically determines these values via the _FDE and _FDI methods, but this can be overridden by specifying a drive type hint.
Normally, each configured drive will be probed at initialization time, using a short seek sequence. This is intended to find out about drives that have been configured but are actually missing or otherwise not responding. (The ACPI probe method does not perform this seek.) In some environments (like laptops with detachable drives), it might be desirable to bypass this drive probe, and pretend a drive to be there so the driver autoconfiguration will work even if the drive is currently not present. For that purpose, a per-drive device flags value of 0x20 needs to be specified.
When opening the device with O_NONBLOCK set, automatic media density selection will be bypassed, and the device remains in a half-opened state. No actual I/O operations are possible, but many of the ioctl(2) commands described below can be performed. This mode is intended for access to the device without the requirement to have an accessible media present, like for status inquiries to the drive, or in order to format a medium. O_NONBLOCK needs to be cleared before I/O operations are possible on the descriptor, which requires a prior specification of the density using the FD_STYPE command (see below). Operations that are not allowed on the half-opened descriptor will cause an error value of Er EAGAIN .
The following ioctl(2) commands are currently available:
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |