linux/drivers/ata
Tejun Heo 27943620cb libata: implement spurious irq handling for SFF and apply it to piix
Traditional IDE interface sucks in that it doesn't have a reliable IRQ
pending bit, so if the controller raises IRQ while the driver is
expecting it not to, the IRQ won't be cleared and eventually the IRQ
line will be killed by interrupt subsystem.  Some controllers have
non-standard mechanism to indicate IRQ pending so that this condition
can be detected and worked around.

This patch adds an optional operation ->sff_irq_check() which will be
called for each port from the ata_sff_interrupt() if an unexpected
interrupt is received.  If the operation returns %true,
->sff_check_status() and ->sff_irq_clear() will be cleared for the
port.  Note that this doesn't mark the interrupt as handled so it
won't prevent IRQ subsystem from killing the IRQ if this mechanism
fails to clear the spurious IRQ.

This patch also implements ->sff_irq_check() for ata_piix.  Note that
this adds slight overhead to shared IRQ operation as IRQs which are
destined for other controllers will trigger extra register accesses to
check whether IDE interrupt is pending but this solves rare screaming
IRQ cases and for some curious reason also helps weird BIOS related
glitch on Samsung n130 as reported in bko#14314.

  http://bugzilla.kernel.org/show_bug.cgi?id=14314

* piix_base_ops dropped as suggested by Sergei.

* Spurious IRQ detection doesn't kick in anymore if polling qc is in
  progress.  This provides less protection but some controllers have
  possible data corruption issues if the wrong register is accessed
  while a command is in progress.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Johannes Stezenbach <js@sig21.net>
Reported-by: Hans Werner <hwerner4@gmx.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-03-01 14:58:44 -05:00
..
ahci.c ahci: AHCI and RAID mode SATA patch for Intel Cougar Point DeviceIDs 2010-03-01 14:58:43 -05:00
ata_generic.c pata_piccolo: Driver for old Toshiba chipsets 2009-12-03 14:35:31 -05:00
ata_piix.c libata: implement spurious irq handling for SFF and apply it to piix 2010-03-01 14:58:44 -05:00
Kconfig ACPI: do not select ACPI_DOCK from ATA_ACPI 2009-12-24 00:04:40 -05:00
libata-acpi.c libata-acpi: missing _SDD is not an error 2009-12-03 02:46:33 -05:00
libata-core.c libata: retry link resume if necessary 2010-01-12 14:34:14 -05:00
libata-eh.c libata: retry FS IOs even if it has failed with AC_ERR_INVALID 2010-01-20 14:25:11 -05:00
libata-pmp.c
libata-scsi.c block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors 2010-02-26 13:58:08 +01:00
libata-sff.c libata: implement spurious irq handling for SFF and apply it to piix 2010-03-01 14:58:44 -05:00
libata.h libata: make gtf_filter per-dev 2009-10-06 00:26:27 -04:00
Makefile Merge commit 'origin/master' into next 2009-12-09 17:14:38 +11:00
pata_acpi.c
pata_ali.c pata_ali: Fix regression with old devices 2009-12-03 02:46:36 -05:00
pata_amd.c
pata_artop.c
pata_at32.c
pata_at91.c
pata_atiixp.c ahci / atiixp / pci quirks: rename AMD SB900 into Hudson-2 2009-10-16 06:21:20 -04:00
pata_atp867x.c pata_atp867x: add Power Management support 2009-10-06 20:58:23 -04:00
pata_bf54x.c pata_bf54x: handle portmuxing of pins through GPIO PORTs 2009-12-21 13:55:38 -05:00
pata_cmd64x.c pata_cmd64x: fix overclocking of UDMA0-2 modes 2009-12-20 15:42:12 -05:00
pata_cmd640.c
pata_cs5520.c pata_cs5520: remove dead VDMA support 2009-12-03 15:52:51 -05:00
pata_cs5530.c
pata_cs5535.c pata_cs5535: fix comment header typo 2009-11-09 09:40:55 +01:00
pata_cs5536.c pata_cs5536: use 32-bit BM DMA template instead of 16-bit. 2009-12-03 02:46:34 -05:00
pata_cypress.c
pata_efar.c [libata] MWDMA0 is unsupported on PIIX-like PATA controllers 2009-12-03 17:52:16 -05:00
pata_hpt3x2n.c pata_hpt{37x|3x2n}: improve timing register documentation 2010-03-01 14:58:43 -05:00
pata_hpt3x3.c pata_hpt3x3: Power Management fix 2009-12-03 15:58:53 -05:00
pata_hpt37x.c pata_hpt{37x|3x2n}: improve timing register documentation 2010-03-01 14:58:43 -05:00
pata_hpt366.c pata_hpt366: remove irrelevant TODO 2010-03-01 14:58:43 -05:00
pata_icside.c
pata_isapnp.c
pata_it821x.c pata-it821x: use PCI_DEVICE_ID_RDC_D1010 define 2009-12-03 02:46:35 -05:00
pata_it8213.c pata_it8213: MWDMA0 is unsupported 2009-12-03 17:53:27 -05:00
pata_ixp4xx_cf.c
pata_jmicron.c
pata_legacy.c pata_legacy: add pointers to QDI65x0 documentation 2009-12-03 16:06:47 -05:00
pata_macio.c libata/drivers: Add driver for Apple "MacIO" IDE controller 2009-12-09 17:09:28 +11:00
pata_marvell.c pata_marvell: fix marvell_pre_reset() documentation 2009-12-03 16:07:12 -05:00
pata_mpc52xx.c
pata_mpiix.c
pata_netcell.c
pata_ninja32.c
pata_ns87410.c
pata_ns87415.c pata_ns87415: Power Management fix 2009-12-03 16:08:30 -05:00
pata_octeon_cf.c pata_octeon_cf: use resource_size(), to fix resource sizing bug 2009-12-17 01:02:50 -05:00
pata_of_platform.c
pata_oldpiix.c [libata] MWDMA0 is unsupported on PIIX-like PATA controllers 2009-12-03 17:52:16 -05:00
pata_opti.c
pata_optidma.c
pata_palmld.c
pata_pcmcia.c pcmcia: rework the irq_req_t typedef 2009-11-28 18:03:14 +01:00
pata_pdc202xx_old.c
pata_pdc2027x.c
pata_piccolo.c pata_piccolo: Driver for old Toshiba chipsets 2009-12-03 14:35:31 -05:00
pata_platform.c
pata_qdi.c
pata_radisys.c pata_radisys: fix UDMA handling 2009-12-03 16:11:24 -05:00
pata_rb532_cf.c
pata_rdc.c [libata] MWDMA0 is unsupported on PIIX-like PATA controllers 2009-12-03 17:52:16 -05:00
pata_rz1000.c pata_rz1000: Power Management fix 2009-12-03 16:12:35 -05:00
pata_sc1200.c pata_sc1200: Fix crash on boot 2009-10-16 06:22:40 -04:00
pata_scc.c
pata_sch.c
pata_serverworks.c
pata_sil680.c ata: use pci_dev->revision 2009-12-03 14:36:17 -05:00
pata_sis.c Revert "pata_sis: Implement MWDMA for the UDMA 133 capable chips" 2009-12-07 11:41:25 -05:00
pata_sl82c105.c
pata_triflex.c
pata_via.c pata_via: clear UDMA transfer mode bit for PIO and MWDMA 2009-12-03 16:13:39 -05:00
pata_winbond.c
pdc_adma.c
sata_fsl.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
sata_inic162x.c
sata_mv.c Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2009-12-19 11:04:29 -08:00
sata_nv.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
sata_promise.c sata_promise: don't classify overruns as HSM errors 2010-01-12 14:33:07 -05:00
sata_promise.h
sata_qstor.c
sata_sil24.c sata_sil24: MSI support, disabled by default 2009-12-03 02:46:34 -05:00
sata_sil.c
sata_sis.c
sata_svw.c
sata_sx4.c
sata_uli.c
sata_via.c sata_via: Remove redundant device ID for VIA VT8261 2009-11-03 14:27:06 -05:00
sata_vsc.c
sis.h