diff options
author | Mark Lord <liml@rtr.ca> | 2008-05-28 12:01:12 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-30 12:37:24 -0400 |
commit | b406c7a6655da7a2fcd9f72e41262f93ff707748 (patch) | |
tree | a68f3694ad4faf542c251e1553a045ebb0574b3c /drivers | |
parent | 5cf73bfb061552aa18d816d2859409be9ace5306 (diff) |
sata_mv: workaround for 60x1 errata sata13
The "B2" variant of the 6041/6081 (genII) chips requires
that the PHY_MODE3 register be rewritten after any write
to PHY_MODE4.
This fixes a regression introduced by an earlier patch.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/sata_mv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 969a7698778..17093e600d8 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -72,7 +72,7 @@ | |||
72 | #include <linux/libata.h> | 72 | #include <linux/libata.h> |
73 | 73 | ||
74 | #define DRV_NAME "sata_mv" | 74 | #define DRV_NAME "sata_mv" |
75 | #define DRV_VERSION "1.22" | 75 | #define DRV_VERSION "1.23" |
76 | 76 | ||
77 | enum { | 77 | enum { |
78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ | 78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ |
@@ -2557,7 +2557,6 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2557 | */ | 2557 | */ |
2558 | m3 = readl(port_mmio + PHY_MODE3); | 2558 | m3 = readl(port_mmio + PHY_MODE3); |
2559 | m3 = (m3 & 0x1f) | (0x5555601 << 5); | 2559 | m3 = (m3 & 0x1f) | (0x5555601 << 5); |
2560 | writel(m3, port_mmio + PHY_MODE3); | ||
2561 | 2560 | ||
2562 | if (fix_phy_mode4) { | 2561 | if (fix_phy_mode4) { |
2563 | u32 m4; | 2562 | u32 m4; |
@@ -2573,6 +2572,12 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2573 | 2572 | ||
2574 | writel(m4, port_mmio + PHY_MODE4); | 2573 | writel(m4, port_mmio + PHY_MODE4); |
2575 | } | 2574 | } |
2575 | /* | ||
2576 | * Workaround for 60x1-B2 errata SATA#13: | ||
2577 | * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3, | ||
2578 | * so we must always rewrite PHY_MODE3 after PHY_MODE4. | ||
2579 | */ | ||
2580 | writel(m3, port_mmio + PHY_MODE3); | ||
2576 | 2581 | ||
2577 | /* Revert values of pre-emphasis and signal amps to the saved ones */ | 2582 | /* Revert values of pre-emphasis and signal amps to the saved ones */ |
2578 | m2 = readl(port_mmio + PHY_MODE2); | 2583 | m2 = readl(port_mmio + PHY_MODE2); |