* [PATCH] libata-sff: use ATAPI_{COD|IO}
@ 2011-12-01 15:53 Sergei Shtylyov
2011-12-02 15:39 ` [PATCH v2] " Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-12-01 15:53 UTC (permalink / raw)
To: linux-ide, jgarzik
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(-)
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2] libata-sff: use ATAPI_{COD|IO}
2011-12-01 15:53 [PATCH] libata-sff: use ATAPI_{COD|IO} Sergei Shtylyov
@ 2011-12-02 15:39 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2011-12-02 15:39 UTC (permalink / raw)
To: linux-ide, jgarzik
atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite
these are #define'd in <linux/ata.h>.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
This patch is against the recent Linus' tree.
Changes in v2: corrected typo in the patch description.
drivers/ata/libata-sff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-02 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01 15:53 [PATCH] libata-sff: use ATAPI_{COD|IO} Sergei Shtylyov
2011-12-02 15:39 ` [PATCH v2] " Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).