diff options
author | Michael Chan <mchan@broadcom.com> | 2006-12-17 20:08:07 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-18 00:59:22 -0500 |
commit | 60189ddff03ffce1f0442a7591b2abafdf47e6a3 (patch) | |
tree | 25d3c5c8211fd57942ae0a57d82c66ad4b2110c5 /drivers/net/tg3.c | |
parent | c49a1561ee4b663d2819b5bea3e4684eae217b19 (diff) |
[TG3]: Power down/up 5906 PHY correctly.
The 5906 PHY requires a special register bit to power down and up the
PHY.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 501ea6da03cc..27c73b9ec2d0 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -959,6 +959,13 @@ static int tg3_phy_reset(struct tg3 *tp) | |||
959 | u32 phy_status; | 959 | u32 phy_status; |
960 | int err; | 960 | int err; |
961 | 961 | ||
962 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | ||
963 | u32 val; | ||
964 | |||
965 | val = tr32(GRC_MISC_CFG); | ||
966 | tw32_f(GRC_MISC_CFG, val & ~GRC_MISC_CFG_EPHY_IDDQ); | ||
967 | udelay(40); | ||
968 | } | ||
962 | err = tg3_readphy(tp, MII_BMSR, &phy_status); | 969 | err = tg3_readphy(tp, MII_BMSR, &phy_status); |
963 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); | 970 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); |
964 | if (err != 0) | 971 | if (err != 0) |
@@ -1170,7 +1177,15 @@ static void tg3_power_down_phy(struct tg3 *tp) | |||
1170 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) | 1177 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) |
1171 | return; | 1178 | return; |
1172 | 1179 | ||
1173 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) { | 1180 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { |
1181 | u32 val; | ||
1182 | |||
1183 | tg3_bmcr_reset(tp); | ||
1184 | val = tr32(GRC_MISC_CFG); | ||
1185 | tw32_f(GRC_MISC_CFG, val | GRC_MISC_CFG_EPHY_IDDQ); | ||
1186 | udelay(40); | ||
1187 | return; | ||
1188 | } else { | ||
1174 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 1189 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
1175 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 1190 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); |
1176 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | 1191 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); |