From: Tejun Heo Date: Sat, 24 Feb 2007 13:30:36 +0000 (+0900) Subject: sata_sil: ignore and clear spurious IRQs while executing commands by polling X-Git-Tag: v2.6.20.2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27fa3aff7831b70b77c444aa44adac0a88e07dd6;p=thirdparty%2Fkernel%2Fstable.git sata_sil: ignore and clear spurious IRQs while executing commands by polling sata_sil used to trigger HSM error if IRQ occurs during polling command. This didn't matter because polling wasn't used in sata_sil. However, as of 2.6.20, all IDENTIFYs are performed by polling and device detection sometimes fails due to spurious IRQ. This patch makes sata_sil ignore and clear spurious IRQ while executing commands by polling. This fixes bug#7996 and IMHO should also be included in -stable. Signed-off-by: Tejun Heo Cc: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 7808d0369d91e..baeb34404dbeb 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -383,9 +383,15 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2) goto freeze; } - if (unlikely(!qc || qc->tf.ctl & ATA_NIEN)) + if (unlikely(!qc)) goto freeze; + if (unlikely(qc->tf.flags & ATA_TFLAG_POLLING)) { + /* this sometimes happens, just clear IRQ */ + ata_chk_status(ap); + return; + } + /* Check whether we are expecting interrupt in this state */ switch (ap->hsm_task_state) { case HSM_ST_FIRST: