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