aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 83467a05dc8e..887eaa2a3ebf 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -243,7 +243,7 @@ static const struct ata_port_operations ahci_ops = {
243 .port_stop = ahci_port_stop, 243 .port_stop = ahci_port_stop,
244}; 244};
245 245
246static struct ata_port_info ahci_port_info[] = { 246static const struct ata_port_info ahci_port_info[] = {
247 /* board_ahci */ 247 /* board_ahci */
248 { 248 {
249 .sht = &ahci_sht, 249 .sht = &ahci_sht,
@@ -643,7 +643,8 @@ static void ahci_eng_timeout(struct ata_port *ap)
643 * not being called from the SCSI EH. 643 * not being called from the SCSI EH.
644 */ 644 */
645 qc->scsidone = scsi_finish_command; 645 qc->scsidone = scsi_finish_command;
646 ata_qc_complete(qc, AC_ERR_OTHER); 646 qc->err_mask |= AC_ERR_OTHER;
647 ata_qc_complete(qc);
647 } 648 }
648 649
649 spin_unlock_irqrestore(&host_set->lock, flags); 650 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)
664 ci = readl(port_mmio + PORT_CMD_ISSUE); 665 ci = readl(port_mmio + PORT_CMD_ISSUE);
665 if (likely((ci & 0x1) == 0)) { 666 if (likely((ci & 0x1) == 0)) {
666 if (qc) { 667 if (qc) {
667 ata_qc_complete(qc, 0); 668 assert(qc->err_mask == 0);
669 ata_qc_complete(qc);
668 qc = NULL; 670 qc = NULL;
669 } 671 }
670 } 672 }
@@ -681,8 +683,10 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
681 /* command processing has stopped due to error; restart */ 683 /* command processing has stopped due to error; restart */
682 ahci_restart_port(ap, status); 684 ahci_restart_port(ap, status);
683 685
684 if (qc) 686 if (qc) {
685 ata_qc_complete(qc, err_mask); 687 qc->err_mask |= AC_ERR_OTHER;
688 ata_qc_complete(qc);
689 }
686 } 690 }
687 691
688 return 1; 692 return 1;