diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2009-11-02 09:28:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-03 02:39:09 -0500 |
commit | 219c6efefaa3f5cd05db52cda50402b2e1c9ae21 (patch) | |
tree | edffeda5c25cbad045e478b2b4080c7d77134def | |
parent | 47b1b53b41d63f27b308981fde307d415e514431 (diff) |
broadcom: Fix slow link problem
When a 50610 or 50610M is paired against particular remote partners,
link is slow to come up. This patch works around the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/broadcom.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index 9e574ceacf43..1a2b2f2a273a 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c | |||
@@ -242,12 +242,6 @@ static int bcm50610_a0_workaround(struct phy_device *phydev) | |||
242 | { | 242 | { |
243 | int err; | 243 | int err; |
244 | 244 | ||
245 | err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_EXP08, | ||
246 | MII_BCM54XX_EXP_EXP08_RJCT_2MHZ | | ||
247 | MII_BCM54XX_EXP_EXP08_EARLY_DAC_WAKE); | ||
248 | if (err < 0) | ||
249 | return err; | ||
250 | |||
251 | err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_AADJ1CH0, | 245 | err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_AADJ1CH0, |
252 | MII_BCM54XX_EXP_AADJ1CH0_SWP_ABCD_OEN | | 246 | MII_BCM54XX_EXP_AADJ1CH0_SWP_ABCD_OEN | |
253 | MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF); | 247 | MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF); |
@@ -287,8 +281,20 @@ static int bcm54xx_phydsp_config(struct phy_device *phydev) | |||
287 | if (err < 0) | 281 | if (err < 0) |
288 | return err; | 282 | return err; |
289 | 283 | ||
290 | if (phydev->drv->phy_id == PHY_ID_BCM50610) | 284 | if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 || |
291 | err = bcm50610_a0_workaround(phydev); | 285 | BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) { |
286 | /* Clear bit 9 to fix a phy interop issue. */ | ||
287 | err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_EXP08, | ||
288 | MII_BCM54XX_EXP_EXP08_RJCT_2MHZ); | ||
289 | if (err < 0) | ||
290 | goto error; | ||
291 | |||
292 | if (phydev->drv->phy_id == PHY_ID_BCM50610) { | ||
293 | err = bcm50610_a0_workaround(phydev); | ||
294 | if (err < 0) | ||
295 | goto error; | ||
296 | } | ||
297 | } | ||
292 | 298 | ||
293 | if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM57780) { | 299 | if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM57780) { |
294 | int val; | 300 | int val; |