]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
sata_nv: don't rely on NV_INT_DEV indication with ADMA
authorRobert Hancock <hancockr@shaw.ca>
Wed, 24 Jan 2007 02:09:02 +0000 (20:09 -0600)
committerJeff Garzik <jeff@garzik.org>
Wed, 24 Jan 2007 07:01:49 +0000 (02:01 -0500)
commitf740d1689d91415cfc749d17138a11ed03b7d38b
tree6c329d53cbb44e3d483cce99068a93b30409cbb8
parent82490c0937cb455e7e4150455ff52e89a9fc5ab8
sata_nv: don't rely on NV_INT_DEV indication with ADMA

Several people reported issues with certain drive commands timing out on
sata_nv controllers running in ADMA mode. The commands in question were
non-DMA-mapped commands, usually FLUSH CACHE or FLUSH CACHE EXT.

 From experimentation it appears that the NV_INT_DEV indication isn't
always set when a legitimate command completion interrupt is received on
a legacy-mode command, at least not on these controllers in ADMA mode.
When a command is pending on the port, force the flag on always in the
irq_stat value before calling nv_host_intr so that the drive busy state
is always checked by ata_host_intr.

This also fixes some questionable code in nv_host_intr which called
ata_check_status when a command was pending and ata_host_intr returned
"unhandled". If the device interrupted at just the wrong time this could
cause interrupts to be lost.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_nv.c