diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-11 09:22:29 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-11 13:19:11 -0400 |
commit | 643be977f9feba8c3c1e768fc06cac84596ec6f8 (patch) | |
tree | f7c7b23e60cc726ba8874411956d15f3bfd7c9c4 /drivers/scsi/sata_sil24.c | |
parent | 1c1d832cea1ab851a3f9b9d83245f5bc8b5b04b6 (diff) |
[PATCH] sata_sil24: better error message from softreset
Improve softreset error message.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/sata_sil24.c')
-rw-r--r-- | drivers/scsi/sata_sil24.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 24eed37a063f..d6cfd8eb29b9 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -434,6 +434,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
434 | dma_addr_t paddr = pp->cmd_block_dma; | 434 | dma_addr_t paddr = pp->cmd_block_dma; |
435 | unsigned long timeout = jiffies + ATA_TMOUT_BOOT; | 435 | unsigned long timeout = jiffies + ATA_TMOUT_BOOT; |
436 | u32 irq_enable, irq_stat; | 436 | u32 irq_enable, irq_stat; |
437 | const char *reason; | ||
437 | 438 | ||
438 | DPRINTK("ENTER\n"); | 439 | DPRINTK("ENTER\n"); |
439 | 440 | ||
@@ -473,8 +474,11 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
473 | writel(irq_enable, port + PORT_IRQ_ENABLE_SET); | 474 | writel(irq_enable, port + PORT_IRQ_ENABLE_SET); |
474 | 475 | ||
475 | if (!(irq_stat & PORT_IRQ_COMPLETE)) { | 476 | if (!(irq_stat & PORT_IRQ_COMPLETE)) { |
476 | printk(KERN_ERR "ata%u: softreset failed (timeout)\n", ap->id); | 477 | if (irq_stat & PORT_IRQ_ERROR) |
477 | return -EIO; | 478 | reason = "SRST command error"; |
479 | else | ||
480 | reason = "timeout"; | ||
481 | goto err; | ||
478 | } | 482 | } |
479 | 483 | ||
480 | sil24_update_tf(ap); | 484 | sil24_update_tf(ap); |
@@ -486,6 +490,10 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) | |||
486 | out: | 490 | out: |
487 | DPRINTK("EXIT, class=%u\n", *class); | 491 | DPRINTK("EXIT, class=%u\n", *class); |
488 | return 0; | 492 | return 0; |
493 | |||
494 | err: | ||
495 | printk(KERN_ERR "ata%u: softreset failed (%s)\n", ap->id, reason); | ||
496 | return -EIO; | ||
489 | } | 497 | } |
490 | 498 | ||
491 | static int sil24_hardreset(struct ata_port *ap, unsigned int *class) | 499 | static int sil24_hardreset(struct ata_port *ap, unsigned int *class) |