Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29491
b: refs/heads/master
c: e8e008e
h: refs/heads/master
i:
  29489: 74f579f
  29487: 4a75652
v: v3
  • Loading branch information
Tejun Heo committed May 31, 2006
1 parent 80d0f77 commit d9fded3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 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: 135da34573f6d3bab2976a75063f7232a4311a74
refs/heads/master: e8e008e7b5ed8c65675cc9b3e778b8bb909f65ab
26 changes: 14 additions & 12 deletions trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class)
{
void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
const char *reason;
int tout_msec;
int tout_msec, rc;
u32 tmp;

/* sil24 does the right thing(tm) without any protection */
Expand All @@ -605,10 +605,14 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class)
tmp = ata_wait_register(port + PORT_CTRL_STAT,
PORT_CS_DEV_RST, PORT_CS_DEV_RST, 10, tout_msec);

/* SStatus oscillates between zero and valid status for short
* duration after DEV_RST, give it time to settle.
/* SStatus oscillates between zero and valid status after
* DEV_RST, debounce it.
*/
msleep(100);
rc = sata_phy_debounce(ap, sata_deb_timing_before_fsrst);
if (rc) {
reason = "PHY debouncing failed";
goto err;
}

if (tmp & PORT_CS_DEV_RST) {
if (ata_port_offline(ap))
Expand All @@ -617,15 +621,13 @@ static int sil24_hardreset(struct ata_port *ap, unsigned int *class)
goto err;
}

if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
reason = "device not ready";
goto err;
}

/* sil24 doesn't report device class code after hardreset,
* leave *class alone.
/* Sil24 doesn't store signature FIS after hardreset, so we
* can't wait for BSY to clear. Some devices take a long time
* to get ready and those devices will choke if we don't wait
* for BSY clearance here. Tell libata to perform follow-up
* softreset.
*/
return 0;
return -EAGAIN;

err:
ata_port_printk(ap, KERN_ERR, "hardreset failed (%s)\n", reason);
Expand Down

0 comments on commit d9fded3

Please sign in to comment.