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.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 83467a05dc8e..d113290b5fc0 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -214,7 +214,6 @@ static struct scsi_host_template ahci_sht = {
214 .dma_boundary = AHCI_DMA_BOUNDARY, 214 .dma_boundary = AHCI_DMA_BOUNDARY,
215 .slave_configure = ata_scsi_slave_config, 215 .slave_configure = ata_scsi_slave_config,
216 .bios_param = ata_std_bios_param, 216 .bios_param = ata_std_bios_param,
217 .ordered_flush = 1,
218}; 217};
219 218
220static const struct ata_port_operations ahci_ops = { 219static const struct ata_port_operations ahci_ops = {
@@ -243,7 +242,7 @@ static const struct ata_port_operations ahci_ops = {
243 .port_stop = ahci_port_stop, 242 .port_stop = ahci_port_stop,
244}; 243};
245 244
246static struct ata_port_info ahci_port_info[] = { 245static const struct ata_port_info ahci_port_info[] = {
247 /* board_ahci */ 246 /* board_ahci */
248 { 247 {
249 .sht = &ahci_sht, 248 .sht = &ahci_sht,
@@ -643,7 +642,8 @@ static void ahci_eng_timeout(struct ata_port *ap)
643 * not being called from the SCSI EH. 642 * not being called from the SCSI EH.
644 */ 643 */
645 qc->scsidone = scsi_finish_command; 644 qc->scsidone = scsi_finish_command;
646 ata_qc_complete(qc, AC_ERR_OTHER); 645 qc->err_mask |= AC_ERR_OTHER;
646 ata_qc_complete(qc);
647 } 647 }
648 648
649 spin_unlock_irqrestore(&host_set->lock, flags); 649 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)
664 ci = readl(port_mmio + PORT_CMD_ISSUE); 664 ci = readl(port_mmio + PORT_CMD_ISSUE);
665 if (likely((ci & 0x1) == 0)) { 665 if (likely((ci & 0x1) == 0)) {
666 if (qc) { 666 if (qc) {
667 ata_qc_complete(qc, 0); 667 assert(qc->err_mask == 0);
668 ata_qc_complete(qc);
668 qc = NULL; 669 qc = NULL;
669 } 670 }
670 } 671 }
@@ -681,8 +682,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 */ 682 /* command processing has stopped due to error; restart */
682 ahci_restart_port(ap, status); 683 ahci_restart_port(ap, status);
683 684
684 if (qc) 685 if (qc) {
685 ata_qc_complete(qc, err_mask); 686 qc->err_mask |= AC_ERR_OTHER;
687 ata_qc_complete(qc);
688 }
686 } 689 }
687 690
688 return 1; 691 return 1;