Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275335
b: refs/heads/master
c: 7a46c07
h: refs/heads/master
i:
  275333: 895c09a
  275331: 5387d69
  275327: 63bccce
v: v3
  • Loading branch information
Gwendal Grignou authored and Jeff Garzik committed Nov 9, 2011
1 parent 4820ad6 commit e6448a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 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: 142924cf402f9c0568004f0e2a27988fe3556c61
refs/heads/master: 7a46c0780babea7d0b3f277a33ea243be38eb942
12 changes: 11 additions & 1 deletion trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2883,7 +2883,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
sata_scr_read(link, SCR_STATUS, &sstatus))
rc = -ERESTART;

if (rc == -ERESTART || try >= max_tries) {
if (try >= max_tries) {
/*
* Thaw host port even if reset failed, so that the port
* can be retried on the next phy event. This risks
Expand All @@ -2909,6 +2909,16 @@ int ata_eh_reset(struct ata_link *link, int classify,
ata_eh_acquire(ap);
}

/*
* While disks spinup behind PMP, some controllers fail sending SRST.
* They need to be reset - as well as the PMP - before retrying.
*/
if (rc == -ERESTART) {
if (ata_is_host_link(link))
ata_eh_thaw_port(ap);
goto out;
}

if (try == max_tries - 1) {
sata_down_spd_limit(link, 0);
if (slave)
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/ata/libata-pmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,9 @@ static void sata_pmp_quirks(struct ata_port *ap)
/* link reports offline after LPM */
link->flags |= ATA_LFLAG_NO_LPM;

/* Class code report is unreliable and SRST
* times out under certain configurations.
*/
/* Class code report is unreliable. */
if (link->pmp < 5)
link->flags |= ATA_LFLAG_NO_SRST |
ATA_LFLAG_ASSUME_ATA;
link->flags |= ATA_LFLAG_ASSUME_ATA;

/* port 5 is for SEMB device and it doesn't like SRST */
if (link->pmp == 5)
Expand Down

0 comments on commit e6448a9

Please sign in to comment.