• Ingo Molnar's avatar
    [PATCH] lockdep: floppy.c irq release fix · 3e541a4a
    Ingo Molnar authored
    The lock validator triggered a number of bugs in the floppy driver, all
    related to the floppy driver allocating and freeing irq and dma resources from
    interrupt context.  The initial solution was to use schedule_work() to push
    this into process context, but this caused further problems: for example the
    current floppy driver in -mm2 is totally broken and all floppy commands time
    out with an error.  (as reported by Barry K.  Nathan)
    
    This patch tries another solution: simply get rid of all that dynamic IRQ and
    DMA allocation/freeing.  I doubt it made much sense back in the heydays of
    floppies (if two devices raced for DMA or IRQ resources then we didnt handle
    those cases too gracefully anyway), and today it makes near zero sense.
    
    So the new code does the simplest and most straightforward thing: allocate IRQ
    and DMA resources at module init time, and free them at module removal time.
    Dont try to release while the driver is operational.  This, besides making the
    floppy driver functional again has an added bonus, floppy IRQ stats are
    finally persistent and visible in /proc/interrupts:
    
      6: 63 XT-PIC-level floppy
    
    Besides normal floppy IO i have also tested IO error handling, motor-off
    timeouts, etc.  - and everything seems to be working fine.
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    3e541a4a
Name
Last commit
Last update
..
acorn Loading commit data...
acpi Loading commit data...
amba Loading commit data...
atm Loading commit data...
base Loading commit data...
block Loading commit data...
bluetooth Loading commit data...
cdrom Loading commit data...
char Loading commit data...
clocksource Loading commit data...
connector Loading commit data...
cpufreq Loading commit data...
crypto Loading commit data...
dio Loading commit data...
dma Loading commit data...
edac Loading commit data...
eisa Loading commit data...
fc4 Loading commit data...
firmware Loading commit data...
hwmon Loading commit data...
i2c Loading commit data...
ide Loading commit data...
ieee1394 Loading commit data...
infiniband Loading commit data...
input Loading commit data...
isdn Loading commit data...
leds Loading commit data...
macintosh Loading commit data...
mca Loading commit data...
md Loading commit data...
media Loading commit data...
message Loading commit data...
mfd Loading commit data...
misc Loading commit data...
mmc Loading commit data...
mtd Loading commit data...
net Loading commit data...
nubus Loading commit data...
oprofile Loading commit data...
parisc Loading commit data...
parport Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
pnp Loading commit data...
rapidio Loading commit data...
rtc Loading commit data...
s390 Loading commit data...
sbus Loading commit data...
scsi Loading commit data...
serial Loading commit data...
sh Loading commit data...
sn Loading commit data...
spi Loading commit data...
tc Loading commit data...
telephony Loading commit data...
usb Loading commit data...
video Loading commit data...
w1 Loading commit data...
zorro Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...