[PATCH] libata: make reset methods complain when they fail
authorTejun Heo <htejun@gmail.com>
Tue, 11 Apr 2006 13:16:45 +0000 (22:16 +0900)
committerJeff Garzik <jeff@garzik.org>
Tue, 11 Apr 2006 17:12:46 +0000 (13:12 -0400)
Make reset methods complain loud when they fail.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/scsi/libata-core.c
drivers/scsi/sata_sil24.c

index 92b5077..2d76ce2 100644 (file)
@@ -2232,8 +2232,10 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
         * the bus shows 0xFF because the odd clown forgets the D7
         * pulldown resistor.
         */
-       if (ata_check_status(ap) == 0xFF)
+       if (ata_check_status(ap) == 0xFF) {
+               printk(KERN_ERR "ata%u: SRST failed (status 0xFF)\n", ap->id);
                return AC_ERR_OTHER;
+       }
 
        ata_bus_post_reset(ap, devmask);
 
@@ -2494,8 +2496,8 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class)
        }
 
        if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
-               printk(KERN_ERR "ata%u: COMRESET failed "
-                      "(device not ready)\n", ap->id);
+               printk(KERN_ERR
+                      "ata%u: COMRESET failed (device not ready)\n", ap->id);
                return -EIO;
        }
 
index 26d84e0..a9506ad 100644 (file)
@@ -473,7 +473,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
        writel(irq_enable, port + PORT_IRQ_ENABLE_SET);
 
        if (!(irq_stat & PORT_IRQ_COMPLETE)) {
-               DPRINTK("EXIT, srst failed\n");
+               printk(KERN_ERR "ata%u: softreset failed (timeout)\n", ap->id);
                return -EIO;
        }