diff options
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) |