From: Tejun Heo Date: Mon, 22 Aug 2005 08:12:45 +0000 (+0900) Subject: [PATCH] libata: implement ata_poll_qc_complete and use it in polling functions X-Git-Tag: v2.6.14-rc1~1056^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40e8c82c74b9be793601e098fd1313bc2632c5dc;p=pandora-kernel.git [PATCH] libata: implement ata_poll_qc_complete and use it in polling functions [PATCH libata-dev-2.6:upstream] implement ata_poll_qc_complete and use it in polling functions Previously, libata polling functions turned irq back on and completed qc commands without holding host lock. This creates a race condition between the polling task and interrupts from other ports on the same host set or spurious interrupt from itself. This patch implements ata_poll_qc_complete which enables irq and completes qc atomically and convert all polling functions. Note: atapi_packet_task() didn't use to turn irq back on or clear ATA_FLAG_NOINTR on error exits. This patch makes it use ata_poll_qc_complete which does both. Note: With this change, ALL invocations of ata_qc_complete() are now done under host_set lock. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed