linux/drivers/block
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
..
aoe [NET]: Clean up skb_linearize 2006-06-17 21:30:16 -07:00
paride Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
acsi_slm.c [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree 2006-06-26 12:25:08 -07:00
acsi.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
amiflop.c [PATCH] m68k: introduce irq controller 2006-06-25 10:00:57 -07:00
ataflop.c [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00
cciss_cmd.h [PATCH] cciss: direct lookup for command completions 2005-09-13 08:22:30 -07:00
cciss_scsi.c [SCSI] fix up request buffer reference in various scsi drivers 2006-06-06 11:07:25 -04:00
cciss_scsi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cciss.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
cciss.h [PATCH] CCISS: request all PCI resources 2006-06-25 10:01:21 -07:00
cpqarray.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
cpqarray.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cryptoloop.c [CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriate 2005-09-01 17:43:25 -07:00
DAC960.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
DAC960.h [PATCH] DAC960: add support for Mylex AcceleRAID 4/5/600 2005-05-05 16:36:43 -07:00
floppy.c [PATCH] lockdep: floppy.c irq release fix 2006-07-03 15:27:00 -07:00
ida_cmd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ida_ioctl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [PATCH] frv: initrd is grossly broken on frv (never built) 2006-06-23 07:42:55 -07:00
loop.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile [PATCH] block: floppy98 removal, really. 2006-03-24 07:33:26 -08:00
nbd.c [PATCH] drivers/block/nbd.c compile fix 2006-07-01 09:56:04 -07:00
pktcdvd.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ps2esdi.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
rd.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
smart1,2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
swim3.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
swim_iop.c [PATCH] drivers/block: fix-up schedule_timeout() usage 2005-09-10 10:06:38 -07:00
sx8.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
ub.c [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00
umem.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
viodasd.c [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. 2006-06-26 12:25:09 -07:00
xd.c [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00
xd.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
z2ram.c [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00