]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/ahci.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / drivers / scsi / ahci.c
index cfbdd3f071b62771e5928b3bce2a3c938f4d3203..887eaa2a3ebf129cd61a5f0ffa401c14c867bd0f 100644 (file)
@@ -643,7 +643,8 @@ static void ahci_eng_timeout(struct ata_port *ap)
                 * not being called from the SCSI EH.
                 */
                qc->scsidone = scsi_finish_command;
-               ata_qc_complete(qc, AC_ERR_OTHER);
+               qc->err_mask |= AC_ERR_OTHER;
+               ata_qc_complete(qc);
        }
 
        spin_unlock_irqrestore(&host_set->lock, flags);
@@ -664,7 +665,8 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
        ci = readl(port_mmio + PORT_CMD_ISSUE);
        if (likely((ci & 0x1) == 0)) {
                if (qc) {
-                       ata_qc_complete(qc, 0);
+                       assert(qc->err_mask == 0);
+                       ata_qc_complete(qc);
                        qc = NULL;
                }
        }
@@ -681,8 +683,10 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
                /* command processing has stopped due to error; restart */
                ahci_restart_port(ap, status);
 
-               if (qc)
-                       ata_qc_complete(qc, err_mask);
+               if (qc) {
+                       qc->err_mask |= AC_ERR_OTHER;
+                       ata_qc_complete(qc);
+               }
        }
 
        return 1;