Skip to content

Commit

Permalink
[PATCH] libata: make reset methods complain when they fail
Browse files Browse the repository at this point in the history
Make reset methods complain loud when they fail.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 11, 2006
1 parent 2bf2cb2 commit 987d2f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 987d2f0

Please sign in to comment.