sata_mv ncq Ignore response status LSB on NCQ
authorMark Lord <liml@rtr.ca>
Sat, 26 Jan 2008 23:32:09 +0000 (18:32 -0500)
committerJeff Garzik <jeff@garzik.org>
Fri, 1 Feb 2008 16:29:47 +0000 (11:29 -0500)
The lower 8 bits of response status are not valid for NCQ.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_mv.c

index c60255810e68d787b1686a0a65b2630fd0e1c90f..207c400c64dfad76f177c50c2ece410392dc24f5 100644 (file)
@@ -1590,13 +1590,12 @@ static void mv_intr_edma(struct ata_port *ap)
 
                qc = ata_qc_from_tag(ap, tag);
 
-               /* lower 8 bits of status are EDMA_ERR_IRQ_CAUSE_OFS
-                * bits (WARNING: might not necessarily be associated
-                * with this command), which -should- be clear
-                * if all is well
+               /* For non-NCQ mode, the lower 8 bits of status
+                * are from EDMA_ERR_IRQ_CAUSE_OFS,
+                * which should be zero if all went well.
                 */
                status = le16_to_cpu(pp->crpb[out_index].flags);
-               if (unlikely(status & 0xff)) {
+               if ((status & 0xff) && !(pp->pp_flags & MV_PP_FLAG_NCQ_EN)) {
                        mv_err_intr(ap, qc);
                        return;
                }