aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-16 09:23:30 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-16 09:23:30 -0500
commitc2cd76ff106b8bd9c0a754c6439c74e86fd2aba7 (patch)
treed3a7848336627da12c47c18cbbe42fc70fe8db71
parent75b1f2f865c6e6c6c04e2779750192b8d3d504e8 (diff)
[libata ahci] tone down ATAPI errors
ATA devices don't generate many errors, so the preferred method is to printk() when they occur. ATAPI devices generate tons of exceptions during the normal course of operation, so this change skips logging the most common class of errors.
-rw-r--r--drivers/scsi/ahci.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 894e7113e0b3..5386c0d6101c 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -558,23 +558,25 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
558 pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16); 558 pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16);
559} 559}
560 560
561static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) 561static void ahci_restart_port(struct ata_port *ap, u32 irq_stat)
562{ 562{
563 void __iomem *mmio = ap->host_set->mmio_base; 563 void __iomem *mmio = ap->host_set->mmio_base;
564 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); 564 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
565 u32 tmp; 565 u32 tmp;
566 int work; 566 int work;
567 567
568 printk(KERN_WARNING "ata%u: port reset, " 568 if ((ap->device[0].class != ATA_DEV_ATAPI) ||
569 "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n", 569 ((irq_stat & PORT_IRQ_TF_ERR) == 0))
570 ap->id, 570 printk(KERN_WARNING "ata%u: port reset, "
571 irq_stat, 571 "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n",
572 readl(mmio + HOST_IRQ_STAT), 572 ap->id,
573 readl(port_mmio + PORT_IRQ_STAT), 573 irq_stat,
574 readl(port_mmio + PORT_CMD), 574 readl(mmio + HOST_IRQ_STAT),
575 readl(port_mmio + PORT_TFDATA), 575 readl(port_mmio + PORT_IRQ_STAT),
576 readl(port_mmio + PORT_SCR_STAT), 576 readl(port_mmio + PORT_CMD),
577 readl(port_mmio + PORT_SCR_ERR)); 577 readl(port_mmio + PORT_TFDATA),
578 readl(port_mmio + PORT_SCR_STAT),
579 readl(port_mmio + PORT_SCR_ERR));
578 580
579 /* stop DMA */ 581 /* stop DMA */
580 tmp = readl(port_mmio + PORT_CMD); 582 tmp = readl(port_mmio + PORT_CMD);
@@ -632,7 +634,7 @@ static void ahci_eng_timeout(struct ata_port *ap)
632 printk(KERN_ERR "ata%u: BUG: timeout without command\n", 634 printk(KERN_ERR "ata%u: BUG: timeout without command\n",
633 ap->id); 635 ap->id);
634 } else { 636 } else {
635 ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); 637 ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT));
636 638
637 /* hack alert! We cannot use the supplied completion 639 /* hack alert! We cannot use the supplied completion
638 * function from inside the ->eh_strategy_handler() thread. 640 * function from inside the ->eh_strategy_handler() thread.
@@ -677,7 +679,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
677 err_mask = AC_ERR_HOST_BUS; 679 err_mask = AC_ERR_HOST_BUS;
678 680
679 /* command processing has stopped due to error; restart */ 681 /* command processing has stopped due to error; restart */
680 ahci_intr_error(ap, status); 682 ahci_restart_port(ap, status);
681 683
682 if (qc) 684 if (qc)
683 ata_qc_complete(qc, err_mask); 685 ata_qc_complete(qc, err_mask);