Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142682
b: refs/heads/master
c: 2009177
h: refs/heads/master
v: v3
  • Loading branch information
Mark Lord authored and Jeff Garzik committed Apr 7, 2009
1 parent 8d32243 commit 5f168bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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: 65ad7fef10b50b6c06d6165fa847e2d3636b0a66
refs/heads/master: 2009177329ae565d9e9efd31b399d2f4ed4f0c44
20 changes: 19 additions & 1 deletion trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,25 @@ static int mv_scr_write(struct ata_link *link, unsigned int sc_reg_in, u32 val)
unsigned int ofs = mv_scr_offset(sc_reg_in);

if (ofs != 0xffffffffU) {
writelfl(val, mv_ap_base(link->ap) + ofs);
void __iomem *addr = mv_ap_base(link->ap) + ofs;
if (sc_reg_in == SCR_CONTROL) {
/*
* Workaround for 88SX60x1 FEr SATA#26:
*
* COMRESETs have to take care not to accidently
* put the drive to sleep when writing SCR_CONTROL.
* Setting bits 12..15 prevents this problem.
*
* So if we see an outbound COMMRESET, set those bits.
* Ditto for the followup write that clears the reset.
*
* The proprietary driver does this for
* all chip versions, and so do we.
*/
if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
val |= 0xf000;
}
writelfl(val, addr);
return 0;
} else
return -EINVAL;
Expand Down

0 comments on commit 5f168bb

Please sign in to comment.