Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21899
b: refs/heads/master
c: 10d996a
h: refs/heads/master
i:
  21897: 74b6c53
  21895: fbfd23d
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Mar 12, 2006
1 parent c95fdb8 commit 27b3096
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 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: 75deb6fa985bd3162b9472f1fc394e23294da816
refs/heads/master: 10d996ad1990ec2338c463042db6d5ef4f347187
22 changes: 14 additions & 8 deletions trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ static int sil24_softreset(struct ata_port *ap, int verbose,

DPRINTK("ENTER\n");

if (!sata_dev_present(ap)) {
DPRINTK("PHY reports no device\n");
*class = ATA_DEV_NONE;
goto out;
}

/* temporarily turn off IRQs during SRST */
irq_enable = readl(port + PORT_IRQ_ENABLE_SET);
writel(irq_enable, port + PORT_IRQ_ENABLE_CLR);
Expand Down Expand Up @@ -469,18 +475,18 @@ static int sil24_softreset(struct ata_port *ap, int verbose,
/* restore IRQs */
writel(irq_enable, port + PORT_IRQ_ENABLE_SET);

if (sata_dev_present(ap)) {
if (!(irq_stat & PORT_IRQ_COMPLETE)) {
DPRINTK("EXIT, srst failed\n");
return -EIO;
}

sil24_update_tf(ap);
*class = ata_dev_classify(&pp->tf);
if (!(irq_stat & PORT_IRQ_COMPLETE)) {
DPRINTK("EXIT, srst failed\n");
return -EIO;
}

sil24_update_tf(ap);
*class = ata_dev_classify(&pp->tf);

if (*class == ATA_DEV_UNKNOWN)
*class = ATA_DEV_NONE;

out:
DPRINTK("EXIT, class=%u\n", *class);
return 0;
}
Expand Down

0 comments on commit 27b3096

Please sign in to comment.