提交 987d2f05 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

[PATCH] libata: make reset methods complain when they fail

Make reset methods complain loud when they fail.
Signed-off-by: NTejun Heo <htejun@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 2bf2cb26
...@@ -2232,8 +2232,10 @@ static unsigned int ata_bus_softreset(struct ata_port *ap, ...@@ -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 * the bus shows 0xFF because the odd clown forgets the D7
* pulldown resistor. * 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; return AC_ERR_OTHER;
}
ata_bus_post_reset(ap, devmask); ata_bus_post_reset(ap, devmask);
...@@ -2494,8 +2496,8 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) ...@@ -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)) { if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
printk(KERN_ERR "ata%u: COMRESET failed " printk(KERN_ERR
"(device not ready)\n", ap->id); "ata%u: COMRESET failed (device not ready)\n", ap->id);
return -EIO; return -EIO;
} }
......
...@@ -473,7 +473,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) ...@@ -473,7 +473,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
writel(irq_enable, port + PORT_IRQ_ENABLE_SET); writel(irq_enable, port + PORT_IRQ_ENABLE_SET);
if (!(irq_stat & PORT_IRQ_COMPLETE)) { if (!(irq_stat & PORT_IRQ_COMPLETE)) {
DPRINTK("EXIT, srst failed\n"); printk(KERN_ERR "ata%u: softreset failed (timeout)\n", ap->id);
return -EIO; return -EIO;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册