Patchwork libata-sff: use ATAPI_{COD|IO}

login
register
mail settings
Submitter Sergei Shtylyov
Date Dec. 1, 2011, 3:53 p.m.
Message ID <201112011853.28829.sshtylyov@ru.mvista.com>
Download mbox | patch
Permalink /patch/128706/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Sergei Shtylyov - Dec. 1, 2011, 3:53 p.m.
atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite
these are #define'd in <linux/aha.h>.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
This patch is against the recent Linus' tree.

 drivers/ata/libata-sff.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: linux-2.6/drivers/ata/libata-sff.c
===================================================================
--- linux-2.6.orig/drivers/ata/libata-sff.c
+++ linux-2.6/drivers/ata/libata-sff.c
@@ -929,11 +929,11 @@  static void atapi_pio_bytes(struct ata_q
 	bytes = (bc_hi << 8) | bc_lo;
 
 	/* shall be cleared to zero, indicating xfer of data */
-	if (unlikely(ireason & (1 << 0)))
+	if (unlikely(ireason & ATAPI_COD))
 		goto atapi_check;
 
 	/* make sure transfer direction matches expected */
-	i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0;
+	i_write = ((ireason & ATAPI_IO) == 0) ? 1 : 0;
 	if (unlikely(do_write != i_write))
 		goto atapi_check;