aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ahci.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index c710a7def7a7..894e7113e0b3 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -565,6 +565,17 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
565 u32 tmp; 565 u32 tmp;
566 int work; 566 int work;
567 567
568 printk(KERN_WARNING "ata%u: port reset, "
569 "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n",
570 ap->id,
571 irq_stat,
572 readl(mmio + HOST_IRQ_STAT),
573 readl(port_mmio + PORT_IRQ_STAT),
574 readl(port_mmio + PORT_CMD),
575 readl(port_mmio + PORT_TFDATA),
576 readl(port_mmio + PORT_SCR_STAT),
577 readl(port_mmio + PORT_SCR_ERR));
578
568 /* stop DMA */ 579 /* stop DMA */
569 tmp = readl(port_mmio + PORT_CMD); 580 tmp = readl(port_mmio + PORT_CMD);
570 tmp &= ~PORT_CMD_START; 581 tmp &= ~PORT_CMD_START;
@@ -602,13 +613,6 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
602 tmp |= PORT_CMD_START; 613 tmp |= PORT_CMD_START;
603 writel(tmp, port_mmio + PORT_CMD); 614 writel(tmp, port_mmio + PORT_CMD);
604 readl(port_mmio + PORT_CMD); /* flush */ 615 readl(port_mmio + PORT_CMD); /* flush */
605
606 printk(KERN_WARNING "ata%u: error occurred, port reset (%s%s%s%s)\n",
607 ap->id,
608 irq_stat & PORT_IRQ_TF_ERR ? "taskf " : "",
609 irq_stat & PORT_IRQ_HBUS_ERR ? "hbus " : "",
610 irq_stat & PORT_IRQ_HBUS_DATA_ERR ? "hbus_data " : "",
611 irq_stat & PORT_IRQ_IF_ERR ? "if " : "");
612} 616}
613 617
614static void ahci_eng_timeout(struct ata_port *ap) 618static void ahci_eng_timeout(struct ata_port *ap)
@@ -619,7 +623,7 @@ static void ahci_eng_timeout(struct ata_port *ap)
619 struct ata_queued_cmd *qc; 623 struct ata_queued_cmd *qc;
620 unsigned long flags; 624 unsigned long flags;
621 625
622 DPRINTK("ENTER\n"); 626 printk(KERN_WARNING "ata%u: handling error/timeout\n", ap->id);
623 627
624 spin_lock_irqsave(&host_set->lock, flags); 628 spin_lock_irqsave(&host_set->lock, flags);
625 629
@@ -672,8 +676,9 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
672 else 676 else
673 err_mask = AC_ERR_HOST_BUS; 677 err_mask = AC_ERR_HOST_BUS;
674 678
675 if (err_mask != AC_ERR_DEV) 679 /* command processing has stopped due to error; restart */
676 ahci_intr_error(ap, status); 680 ahci_intr_error(ap, status);
681
677 if (qc) 682 if (qc)
678 ata_qc_complete(qc, err_mask); 683 ata_qc_complete(qc, err_mask);
679 } 684 }