diff options
author | Tejun Heo <htejun@gmail.com> | 2007-02-24 08:30:36 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-24 20:52:12 -0500 |
commit | e2f8fb72144a9f38d44ccf3f939e939392eda659 (patch) | |
tree | d99ac949bde8fa37f2f697b2912a5ca17de8e06f /drivers | |
parent | 6a59dcf8678cbc4106a8a6e158d7408a87691358 (diff) |
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.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/sata_sil.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 14872556334b..aaff357db5f5 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -386,9 +386,15 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2) | |||
386 | goto freeze; | 386 | goto freeze; |
387 | } | 387 | } |
388 | 388 | ||
389 | if (unlikely(!qc || qc->tf.ctl & ATA_NIEN)) | 389 | if (unlikely(!qc)) |
390 | goto freeze; | 390 | goto freeze; |
391 | 391 | ||
392 | if (unlikely(qc->tf.flags & ATA_TFLAG_POLLING)) { | ||
393 | /* this sometimes happens, just clear IRQ */ | ||
394 | ata_chk_status(ap); | ||
395 | return; | ||
396 | } | ||
397 | |||
392 | /* Check whether we are expecting interrupt in this state */ | 398 | /* Check whether we are expecting interrupt in this state */ |
393 | switch (ap->hsm_task_state) { | 399 | switch (ap->hsm_task_state) { |
394 | case HSM_ST_FIRST: | 400 | case HSM_ST_FIRST: |