]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/ahci.c
[PATCH] Fix sg_page_malloc() memset
[linux-2.6-omap-h63xx.git] / drivers / scsi / ahci.c
index 83467a05dc8e3e31f150ca2e030746a1e854b5a7..d113290b5fc01ccf977902881eb60b2f699c4bc1 100644 (file)
@@ -214,7 +214,6 @@ static struct scsi_host_template ahci_sht = {
        .dma_boundary           = AHCI_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
        .bios_param             = ata_std_bios_param,
-       .ordered_flush          = 1,
 };
 
 static const struct ata_port_operations ahci_ops = {
@@ -243,7 +242,7 @@ static const struct ata_port_operations ahci_ops = {
        .port_stop              = ahci_port_stop,
 };
 
-static struct ata_port_info ahci_port_info[] = {
+static const struct ata_port_info ahci_port_info[] = {
        /* board_ahci */
        {
                .sht            = &ahci_sht,
@@ -643,7 +642,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 +664,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 +682,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;