Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55130
b: refs/heads/master
c: b8cffc6
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 1, 2007
1 parent 00448d2 commit aaabc38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 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: 9b89391cc861b8a1105551909eb66c024fe18ab2
refs/heads/master: b8cffc6ad8c000410186815b7bcc6b76ef1bbb13
22 changes: 15 additions & 7 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3338,7 +3338,11 @@ static void ata_wait_spinup(struct ata_port *ap, unsigned long deadline)
* @ap: ATA port to be reset
* @deadline: deadline jiffies for the operation
*
* @ap is about to be reset. Initialize it.
* @ap is about to be reset. Initialize it. Failure from
* prereset makes libata abort whole reset sequence and give up
* that port, so prereset should be best-effort. It does its
* best to prepare for reset sequence but if things go wrong, it
* should just whine, not fail.
*
* LOCKING:
* Kernel thread context (may sleep)
Expand Down Expand Up @@ -3368,19 +3372,23 @@ int ata_std_prereset(struct ata_port *ap, unsigned long deadline)
/* if SATA, resume phy */
if (ap->cbl == ATA_CBL_SATA) {
rc = sata_phy_resume(ap, timing, deadline);
if (rc && rc != -EOPNOTSUPP) {
/* phy resume failed */
/* whine about phy resume failure but proceed */
if (rc && rc != -EOPNOTSUPP)
ata_port_printk(ap, KERN_WARNING, "failed to resume "
"link for reset (errno=%d)\n", rc);
return rc;
}
}

/* Wait for !BSY if the controller can wait for the first D2H
* Reg FIS and we don't know that no device is attached.
*/
if (!(ap->flags & ATA_FLAG_SKIP_D2H_BSY) && !ata_port_offline(ap))
ata_wait_ready(ap, deadline);
if (!(ap->flags & ATA_FLAG_SKIP_D2H_BSY) && !ata_port_offline(ap)) {
rc = ata_wait_ready(ap, deadline);
if (rc) {
ata_port_printk(ap, KERN_WARNING, "device not ready "
"(errno=%d), forcing hardreset\n", rc);
ehc->i.action |= ATA_EH_HARDRESET;
}
}

return 0;
}
Expand Down

0 comments on commit aaabc38

Please sign in to comment.