kernel-ark/drivers
Ingo Molnar 3e541a4ae5 [PATCH] lockdep: floppy.c irq release fix
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: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:00 -07:00
..
acorn [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
acpi [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
amba
atm [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
block [PATCH] lockdep: floppy.c irq release fix 2006-07-03 15:27:00 -07:00
bluetooth
cdrom [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
char [PATCH] make more file_operation structs static 2006-07-03 15:26:59 -07:00
clocksource
connector
cpufreq
crypto
dio
dma [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
edac [PATCH] EDAC: fix module names quoted in sysfs 2006-07-01 09:55:58 -07:00
eisa
fc4 [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
firmware
hwmon
i2c [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
ide [PATCH] irq-flags: ide: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
ieee1394 [PATCH] irq-flags: firewire: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
infiniband [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
input [PATCH] sparc i8042 build fix 2006-07-03 15:27:00 -07:00
isdn [PATCH] irq-flags: isdn: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
leds
macintosh [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mca
md
media [PATCH] irq-flags: media: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
message [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mfd [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
misc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mmc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc 2006-07-02 16:35:07 -07:00
mtd
net [PATCH] irq-flags: drivers/net: Use the new IRQF_ constants 2006-07-02 13:58:51 -07:00
nubus
oprofile
parisc [PATCH] irq-flags: PARISC: Use the new IRQF_ constants 2006-07-02 13:58:52 -07:00
parport [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
pci [PATCH] irq-flags: pci: Use the new IRQF_ constants 2006-07-02 13:58:52 -07:00
pcmcia Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:07:45 -07:00
pnp [PATCH] PNPACPI: support shareable interrupts 2006-07-03 15:26:58 -07:00
rapidio
rtc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
s390
sbus [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
scsi [PATCH] irq-flags: scsi: Use the new IRQF_ constants 2006-07-02 13:58:53 -07:00
serial [PATCH] SERIAL: allow shared 8250_pnp interrupts 2006-07-03 15:26:58 -07:00
sh
sn [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
spi
tc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
telephony
usb Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:04:12 -07:00
video [PATCH] fbdev: Add framebuffer and display update module support for pnx4008 2006-07-03 15:26:59 -07:00
w1
zorro
Kconfig
Makefile