Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29252
b: refs/heads/master
c: 643be97
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 11, 2006
1 parent 86eac3c commit 143d34a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c1d832cea1ab851a3f9b9d83245f5bc8b5b04b6
refs/heads/master: 643be977f9feba8c3c1e768fc06cac84596ec6f8
12 changes: 10 additions & 2 deletions trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
dma_addr_t paddr = pp->cmd_block_dma;
unsigned long timeout = jiffies + ATA_TMOUT_BOOT;
u32 irq_enable, irq_stat;
const char *reason;

DPRINTK("ENTER\n");

Expand Down Expand Up @@ -473,8 +474,11 @@ 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)) {
printk(KERN_ERR "ata%u: softreset failed (timeout)\n", ap->id);
return -EIO;
if (irq_stat & PORT_IRQ_ERROR)
reason = "SRST command error";
else
reason = "timeout";
goto err;
}

sil24_update_tf(ap);
Expand All @@ -486,6 +490,10 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
out:
DPRINTK("EXIT, class=%u\n", *class);
return 0;

err:
printk(KERN_ERR "ata%u: softreset failed (%s)\n", ap->id, reason);
return -EIO;
}

static int sil24_hardreset(struct ata_port *ap, unsigned int *class)
Expand Down

0 comments on commit 143d34a

Please sign in to comment.