Skip to content

Commit

Permalink
[libata] Print out Status register, if a BSY-sleep takes too long
Browse files Browse the repository at this point in the history
We have the info stored in an ata_busy_sleep() variable, so might as
well print it, and provide some additional diagnostic info.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Sep 28, 2006
1 parent d639ca9 commit 35aa7a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap,

if (status & ATA_BUSY)
ata_port_printk(ap, KERN_WARNING,
"port is slow to respond, please be patient\n");
"port is slow to respond, please be patient "
"(Status 0x%x)\n", status);

timeout = timer_start + tmout;
while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) {
Expand All @@ -2350,7 +2351,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap,

if (status & ATA_BUSY) {
ata_port_printk(ap, KERN_ERR, "port failed to respond "
"(%lu secs)\n", tmout / HZ);
"(%lu secs, Status 0x%x)\n",
tmout / HZ, status);
return 1;
}

Expand Down

0 comments on commit 35aa7a4

Please sign in to comment.