1e7751617SMauro Carvalho Chehab============= 2e7751617SMauro Carvalho ChehabFloppy Driver 3e7751617SMauro Carvalho Chehab============= 4e7751617SMauro Carvalho Chehab 5e7751617SMauro Carvalho ChehabFAQ list: 6e7751617SMauro Carvalho Chehab========= 7e7751617SMauro Carvalho Chehab 8e7751617SMauro Carvalho ChehabA FAQ list may be found in the fdutils package (see below), and also 9*c0ad0befSAlexander A. Klimovat <https://fdutils.linux.lu/faq.html>. 10e7751617SMauro Carvalho Chehab 11e7751617SMauro Carvalho Chehab 12e7751617SMauro Carvalho ChehabLILO configuration options (Thinkpad users, read this) 13e7751617SMauro Carvalho Chehab====================================================== 14e7751617SMauro Carvalho Chehab 15e7751617SMauro Carvalho ChehabThe floppy driver is configured using the 'floppy=' option in 16e7751617SMauro Carvalho Chehablilo. This option can be typed at the boot prompt, or entered in the 17e7751617SMauro Carvalho Chehablilo configuration file. 18e7751617SMauro Carvalho Chehab 19e7751617SMauro Carvalho ChehabExample: If your kernel is called linux-2.6.9, type the following line 20e7751617SMauro Carvalho Chehabat the lilo boot prompt (if you have a thinkpad):: 21e7751617SMauro Carvalho Chehab 22e7751617SMauro Carvalho Chehab linux-2.6.9 floppy=thinkpad 23e7751617SMauro Carvalho Chehab 24e7751617SMauro Carvalho ChehabYou may also enter the following line in /etc/lilo.conf, in the description 25e7751617SMauro Carvalho Chehabof linux-2.6.9:: 26e7751617SMauro Carvalho Chehab 27e7751617SMauro Carvalho Chehab append = "floppy=thinkpad" 28e7751617SMauro Carvalho Chehab 29e7751617SMauro Carvalho ChehabSeveral floppy related options may be given, example:: 30e7751617SMauro Carvalho Chehab 31e7751617SMauro Carvalho Chehab linux-2.6.9 floppy=daring floppy=two_fdc 32e7751617SMauro Carvalho Chehab append = "floppy=daring floppy=two_fdc" 33e7751617SMauro Carvalho Chehab 34e7751617SMauro Carvalho ChehabIf you give options both in the lilo config file and on the boot 35e7751617SMauro Carvalho Chehabprompt, the option strings of both places are concatenated, the boot 36e7751617SMauro Carvalho Chehabprompt options coming last. That's why there are also options to 37e7751617SMauro Carvalho Chehabrestore the default behavior. 38e7751617SMauro Carvalho Chehab 39e7751617SMauro Carvalho Chehab 40e7751617SMauro Carvalho ChehabModule configuration options 41e7751617SMauro Carvalho Chehab============================ 42e7751617SMauro Carvalho Chehab 43e7751617SMauro Carvalho ChehabIf you use the floppy driver as a module, use the following syntax:: 44e7751617SMauro Carvalho Chehab 45e7751617SMauro Carvalho Chehab modprobe floppy floppy="<options>" 46e7751617SMauro Carvalho Chehab 47e7751617SMauro Carvalho ChehabExample:: 48e7751617SMauro Carvalho Chehab 49e7751617SMauro Carvalho Chehab modprobe floppy floppy="omnibook messages" 50e7751617SMauro Carvalho Chehab 51e7751617SMauro Carvalho ChehabIf you need certain options enabled every time you load the floppy driver, 52e7751617SMauro Carvalho Chehabyou can put:: 53e7751617SMauro Carvalho Chehab 54e7751617SMauro Carvalho Chehab options floppy floppy="omnibook messages" 55e7751617SMauro Carvalho Chehab 56e7751617SMauro Carvalho Chehabin a configuration file in /etc/modprobe.d/. 57e7751617SMauro Carvalho Chehab 58e7751617SMauro Carvalho Chehab 59e7751617SMauro Carvalho ChehabThe floppy driver related options are: 60e7751617SMauro Carvalho Chehab 61e7751617SMauro Carvalho Chehab floppy=asus_pci 62e7751617SMauro Carvalho Chehab Sets the bit mask to allow only units 0 and 1. (default) 63e7751617SMauro Carvalho Chehab 64e7751617SMauro Carvalho Chehab floppy=daring 65e7751617SMauro Carvalho Chehab Tells the floppy driver that you have a well behaved floppy controller. 66e7751617SMauro Carvalho Chehab This allows more efficient and smoother operation, but may fail on 67e7751617SMauro Carvalho Chehab certain controllers. This may speed up certain operations. 68e7751617SMauro Carvalho Chehab 69e7751617SMauro Carvalho Chehab floppy=0,daring 70e7751617SMauro Carvalho Chehab Tells the floppy driver that your floppy controller should be used 71e7751617SMauro Carvalho Chehab with caution. 72e7751617SMauro Carvalho Chehab 73e7751617SMauro Carvalho Chehab floppy=one_fdc 74e7751617SMauro Carvalho Chehab Tells the floppy driver that you have only one floppy controller. 75e7751617SMauro Carvalho Chehab (default) 76e7751617SMauro Carvalho Chehab 77e7751617SMauro Carvalho Chehab floppy=two_fdc / floppy=<address>,two_fdc 78e7751617SMauro Carvalho Chehab Tells the floppy driver that you have two floppy controllers. 79e7751617SMauro Carvalho Chehab The second floppy controller is assumed to be at <address>. 80e7751617SMauro Carvalho Chehab This option is not needed if the second controller is at address 81e7751617SMauro Carvalho Chehab 0x370, and if you use the 'cmos' option. 82e7751617SMauro Carvalho Chehab 83e7751617SMauro Carvalho Chehab floppy=thinkpad 84e7751617SMauro Carvalho Chehab Tells the floppy driver that you have a Thinkpad. Thinkpads use an 85e7751617SMauro Carvalho Chehab inverted convention for the disk change line. 86e7751617SMauro Carvalho Chehab 87e7751617SMauro Carvalho Chehab floppy=0,thinkpad 88e7751617SMauro Carvalho Chehab Tells the floppy driver that you don't have a Thinkpad. 89e7751617SMauro Carvalho Chehab 90e7751617SMauro Carvalho Chehab floppy=omnibook / floppy=nodma 91e7751617SMauro Carvalho Chehab Tells the floppy driver not to use Dma for data transfers. 92e7751617SMauro Carvalho Chehab This is needed on HP Omnibooks, which don't have a workable 93e7751617SMauro Carvalho Chehab DMA channel for the floppy driver. This option is also useful 94e7751617SMauro Carvalho Chehab if you frequently get "Unable to allocate DMA memory" messages. 95e7751617SMauro Carvalho Chehab Indeed, dma memory needs to be continuous in physical memory, 96e7751617SMauro Carvalho Chehab and is thus harder to find, whereas non-dma buffers may be 97e7751617SMauro Carvalho Chehab allocated in virtual memory. However, I advise against this if 98e7751617SMauro Carvalho Chehab you have an FDC without a FIFO (8272A or 82072). 82072A and 99e7751617SMauro Carvalho Chehab later are OK. You also need at least a 486 to use nodma. 100e7751617SMauro Carvalho Chehab If you use nodma mode, I suggest you also set the FIFO 101e7751617SMauro Carvalho Chehab threshold to 10 or lower, in order to limit the number of data 102e7751617SMauro Carvalho Chehab transfer interrupts. 103e7751617SMauro Carvalho Chehab 104e7751617SMauro Carvalho Chehab If you have a FIFO-able FDC, the floppy driver automatically 105e7751617SMauro Carvalho Chehab falls back on non DMA mode if no DMA-able memory can be found. 106e7751617SMauro Carvalho Chehab If you want to avoid this, explicitly ask for 'yesdma'. 107e7751617SMauro Carvalho Chehab 108e7751617SMauro Carvalho Chehab floppy=yesdma 109e7751617SMauro Carvalho Chehab Tells the floppy driver that a workable DMA channel is available. 110e7751617SMauro Carvalho Chehab (default) 111e7751617SMauro Carvalho Chehab 112e7751617SMauro Carvalho Chehab floppy=nofifo 113e7751617SMauro Carvalho Chehab Disables the FIFO entirely. This is needed if you get "Bus 114e7751617SMauro Carvalho Chehab master arbitration error" messages from your Ethernet card (or 115e7751617SMauro Carvalho Chehab from other devices) while accessing the floppy. 116e7751617SMauro Carvalho Chehab 117e7751617SMauro Carvalho Chehab floppy=usefifo 118e7751617SMauro Carvalho Chehab Enables the FIFO. (default) 119e7751617SMauro Carvalho Chehab 120e7751617SMauro Carvalho Chehab floppy=<threshold>,fifo_depth 121e7751617SMauro Carvalho Chehab Sets the FIFO threshold. This is mostly relevant in DMA 122e7751617SMauro Carvalho Chehab mode. If this is higher, the floppy driver tolerates more 123e7751617SMauro Carvalho Chehab interrupt latency, but it triggers more interrupts (i.e. it 124e7751617SMauro Carvalho Chehab imposes more load on the rest of the system). If this is 125e7751617SMauro Carvalho Chehab lower, the interrupt latency should be lower too (faster 126e7751617SMauro Carvalho Chehab processor). The benefit of a lower threshold is less 127e7751617SMauro Carvalho Chehab interrupts. 128e7751617SMauro Carvalho Chehab 129e7751617SMauro Carvalho Chehab To tune the fifo threshold, switch on over/underrun messages 130e7751617SMauro Carvalho Chehab using 'floppycontrol --messages'. Then access a floppy 131e7751617SMauro Carvalho Chehab disk. If you get a huge amount of "Over/Underrun - retrying" 132e7751617SMauro Carvalho Chehab messages, then the fifo threshold is too low. Try with a 133e7751617SMauro Carvalho Chehab higher value, until you only get an occasional Over/Underrun. 134e7751617SMauro Carvalho Chehab It is a good idea to compile the floppy driver as a module 135e7751617SMauro Carvalho Chehab when doing this tuning. Indeed, it allows to try different 136e7751617SMauro Carvalho Chehab fifo values without rebooting the machine for each test. Note 137e7751617SMauro Carvalho Chehab that you need to do 'floppycontrol --messages' every time you 138e7751617SMauro Carvalho Chehab re-insert the module. 139e7751617SMauro Carvalho Chehab 140e7751617SMauro Carvalho Chehab Usually, tuning the fifo threshold should not be needed, as 141e7751617SMauro Carvalho Chehab the default (0xa) is reasonable. 142e7751617SMauro Carvalho Chehab 143e7751617SMauro Carvalho Chehab floppy=<drive>,<type>,cmos 144e7751617SMauro Carvalho Chehab Sets the CMOS type of <drive> to <type>. This is mandatory if 145e7751617SMauro Carvalho Chehab you have more than two floppy drives (only two can be 146e7751617SMauro Carvalho Chehab described in the physical CMOS), or if your BIOS uses 147e7751617SMauro Carvalho Chehab non-standard CMOS types. The CMOS types are: 148e7751617SMauro Carvalho Chehab 149e7751617SMauro Carvalho Chehab == ================================== 150e7751617SMauro Carvalho Chehab 0 Use the value of the physical CMOS 151e7751617SMauro Carvalho Chehab 1 5 1/4 DD 152e7751617SMauro Carvalho Chehab 2 5 1/4 HD 153e7751617SMauro Carvalho Chehab 3 3 1/2 DD 154e7751617SMauro Carvalho Chehab 4 3 1/2 HD 155e7751617SMauro Carvalho Chehab 5 3 1/2 ED 156e7751617SMauro Carvalho Chehab 6 3 1/2 ED 157e7751617SMauro Carvalho Chehab 16 unknown or not installed 158e7751617SMauro Carvalho Chehab == ================================== 159e7751617SMauro Carvalho Chehab 160e7751617SMauro Carvalho Chehab (Note: there are two valid types for ED drives. This is because 5 was 161e7751617SMauro Carvalho Chehab initially chosen to represent floppy *tapes*, and 6 for ED drives. 162e7751617SMauro Carvalho Chehab AMI ignored this, and used 5 for ED drives. That's why the floppy 163e7751617SMauro Carvalho Chehab driver handles both.) 164e7751617SMauro Carvalho Chehab 165e7751617SMauro Carvalho Chehab floppy=unexpected_interrupts 166e7751617SMauro Carvalho Chehab Print a warning message when an unexpected interrupt is received. 167e7751617SMauro Carvalho Chehab (default) 168e7751617SMauro Carvalho Chehab 169e7751617SMauro Carvalho Chehab floppy=no_unexpected_interrupts / floppy=L40SX 170e7751617SMauro Carvalho Chehab Don't print a message when an unexpected interrupt is received. This 171e7751617SMauro Carvalho Chehab is needed on IBM L40SX laptops in certain video modes. (There seems 172e7751617SMauro Carvalho Chehab to be an interaction between video and floppy. The unexpected 173e7751617SMauro Carvalho Chehab interrupts affect only performance, and can be safely ignored.) 174e7751617SMauro Carvalho Chehab 175e7751617SMauro Carvalho Chehab floppy=broken_dcl 176e7751617SMauro Carvalho Chehab Don't use the disk change line, but assume that the disk was 177e7751617SMauro Carvalho Chehab changed whenever the device node is reopened. Needed on some 178e7751617SMauro Carvalho Chehab boxes where the disk change line is broken or unsupported. 179e7751617SMauro Carvalho Chehab This should be regarded as a stopgap measure, indeed it makes 180e7751617SMauro Carvalho Chehab floppy operation less efficient due to unneeded cache 181e7751617SMauro Carvalho Chehab flushings, and slightly more unreliable. Please verify your 182e7751617SMauro Carvalho Chehab cable, connection and jumper settings if you have any DCL 183e7751617SMauro Carvalho Chehab problems. However, some older drives, and also some laptops 184e7751617SMauro Carvalho Chehab are known not to have a DCL. 185e7751617SMauro Carvalho Chehab 186e7751617SMauro Carvalho Chehab floppy=debug 187e7751617SMauro Carvalho Chehab Print debugging messages. 188e7751617SMauro Carvalho Chehab 189e7751617SMauro Carvalho Chehab floppy=messages 190e7751617SMauro Carvalho Chehab Print informational messages for some operations (disk change 191e7751617SMauro Carvalho Chehab notifications, warnings about over and underruns, and about 192e7751617SMauro Carvalho Chehab autodetection). 193e7751617SMauro Carvalho Chehab 194e7751617SMauro Carvalho Chehab floppy=silent_dcl_clear 195e7751617SMauro Carvalho Chehab Uses a less noisy way to clear the disk change line (which 196e7751617SMauro Carvalho Chehab doesn't involve seeks). Implied by 'daring' option. 197e7751617SMauro Carvalho Chehab 198e7751617SMauro Carvalho Chehab floppy=<nr>,irq 199e7751617SMauro Carvalho Chehab Sets the floppy IRQ to <nr> instead of 6. 200e7751617SMauro Carvalho Chehab 201e7751617SMauro Carvalho Chehab floppy=<nr>,dma 202e7751617SMauro Carvalho Chehab Sets the floppy DMA channel to <nr> instead of 2. 203e7751617SMauro Carvalho Chehab 204e7751617SMauro Carvalho Chehab floppy=slow 205e7751617SMauro Carvalho Chehab Use PS/2 stepping rate:: 206e7751617SMauro Carvalho Chehab 207e7751617SMauro Carvalho Chehab PS/2 floppies have much slower step rates than regular floppies. 208e7751617SMauro Carvalho Chehab It's been recommended that take about 1/4 of the default speed 209e7751617SMauro Carvalho Chehab in some more extreme cases. 210e7751617SMauro Carvalho Chehab 211e7751617SMauro Carvalho Chehab 212e7751617SMauro Carvalho ChehabSupporting utilities and additional documentation: 213e7751617SMauro Carvalho Chehab================================================== 214e7751617SMauro Carvalho Chehab 215e7751617SMauro Carvalho ChehabAdditional parameters of the floppy driver can be configured at 216e7751617SMauro Carvalho Chehabruntime. Utilities which do this can be found in the fdutils package. 217e7751617SMauro Carvalho ChehabThis package also contains a new version of mtools which allows to 218e7751617SMauro Carvalho Chehabaccess high capacity disks (up to 1992K on a high density 3 1/2 disk!). 219e7751617SMauro Carvalho ChehabIt also contains additional documentation about the floppy driver. 220e7751617SMauro Carvalho Chehab 221e7751617SMauro Carvalho ChehabThe latest version can be found at fdutils homepage: 222e7751617SMauro Carvalho Chehab 223*c0ad0befSAlexander A. Klimov https://fdutils.linux.lu 224e7751617SMauro Carvalho Chehab 225e7751617SMauro Carvalho ChehabThe fdutils releases can be found at: 226e7751617SMauro Carvalho Chehab 227*c0ad0befSAlexander A. Klimov https://fdutils.linux.lu/download.html 228e7751617SMauro Carvalho Chehab 229e7751617SMauro Carvalho Chehab http://www.tux.org/pub/knaff/fdutils/ 230e7751617SMauro Carvalho Chehab 231e7751617SMauro Carvalho Chehab ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ 232e7751617SMauro Carvalho Chehab 233e7751617SMauro Carvalho ChehabReporting problems about the floppy driver 234e7751617SMauro Carvalho Chehab========================================== 235e7751617SMauro Carvalho Chehab 236e7751617SMauro Carvalho ChehabIf you have a question or a bug report about the floppy driver, mail 237e7751617SMauro Carvalho Chehabme at Alain.Knaff@poboxes.com . If you post to Usenet, preferably use 238e7751617SMauro Carvalho Chehabcomp.os.linux.hardware. As the volume in these groups is rather high, 239e7751617SMauro Carvalho Chehabbe sure to include the word "floppy" (or "FLOPPY") in the subject 240e7751617SMauro Carvalho Chehabline. If the reported problem happens when mounting floppy disks, be 241e7751617SMauro Carvalho Chehabsure to mention also the type of the filesystem in the subject line. 242e7751617SMauro Carvalho Chehab 243e7751617SMauro Carvalho ChehabBe sure to read the FAQ before mailing/posting any bug reports! 244e7751617SMauro Carvalho Chehab 245e7751617SMauro Carvalho ChehabAlain 246e7751617SMauro Carvalho Chehab 247e7751617SMauro Carvalho ChehabChangelog 248e7751617SMauro Carvalho Chehab========= 249e7751617SMauro Carvalho Chehab 250e7751617SMauro Carvalho Chehab10-30-2004 : 251e7751617SMauro Carvalho Chehab Cleanup, updating, add reference to module configuration. 252e7751617SMauro Carvalho Chehab James Nelson <james4765@gmail.com> 253e7751617SMauro Carvalho Chehab 254e7751617SMauro Carvalho Chehab6-3-2000 : 255e7751617SMauro Carvalho Chehab Original Document 256