aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 4cadfa28f940..9691dd0966d7 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -929,11 +929,11 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
929 bytes = (bc_hi << 8) | bc_lo; 929 bytes = (bc_hi << 8) | bc_lo;
930 930
931 /* shall be cleared to zero, indicating xfer of data */ 931 /* shall be cleared to zero, indicating xfer of data */
932 if (unlikely(ireason & (1 << 0))) 932 if (unlikely(ireason & ATAPI_COD))
933 goto atapi_check; 933 goto atapi_check;
934 934
935 /* make sure transfer direction matches expected */ 935 /* make sure transfer direction matches expected */
936 i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0; 936 i_write = ((ireason & ATAPI_IO) == 0) ? 1 : 0;
937 if (unlikely(do_write != i_write)) 937 if (unlikely(do_write != i_write))
938 goto atapi_check; 938 goto atapi_check;
939 939