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