android_kernel_xiaomi_sm8350/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
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
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
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
cryptoloop.c
DAC960.c [PATCH] irq-flags: drivers/block Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
DAC960.h
floppy.c [PATCH] lockdep: floppy.c irq release fix 2006-07-03 15:27:00 -07:00
ida_cmd.h
ida_ioctl.h
Kconfig
loop.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile
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
swim3.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
swim_iop.c
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
z2ram.c [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed 2006-06-26 12:25:08 -07:00