Skip to content

Commit

Permalink
broadcom: Fix slow link problem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 3, 2009
1 parent 47b1b53 commit 219c6ef
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions drivers/net/phy/broadcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,6 @@ static int bcm50610_a0_workaround(struct phy_device *phydev)
{
int err;

err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_EXP08,
MII_BCM54XX_EXP_EXP08_RJCT_2MHZ |
MII_BCM54XX_EXP_EXP08_EARLY_DAC_WAKE);
if (err < 0)
return err;

err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_AADJ1CH0,
MII_BCM54XX_EXP_AADJ1CH0_SWP_ABCD_OEN |
MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF);
Expand Down Expand Up @@ -287,8 +281,20 @@ static int bcm54xx_phydsp_config(struct phy_device *phydev)
if (err < 0)
return err;

if (phydev->drv->phy_id == PHY_ID_BCM50610)
err = bcm50610_a0_workaround(phydev);
if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610 ||
BRCM_PHY_MODEL(phydev) == PHY_ID_BCM50610M) {
/* Clear bit 9 to fix a phy interop issue. */
err = bcm54xx_exp_write(phydev, MII_BCM54XX_EXP_EXP08,
MII_BCM54XX_EXP_EXP08_RJCT_2MHZ);
if (err < 0)
goto error;

if (phydev->drv->phy_id == PHY_ID_BCM50610) {
err = bcm50610_a0_workaround(phydev);
if (err < 0)
goto error;
}
}

if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM57780) {
int val;
Expand Down

0 comments on commit 219c6ef

Please sign in to comment.