aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgb/common
diff options
context:
space:
mode:
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>2008-12-04 20:32:53 +0000
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>2008-12-04 20:32:53 +0000
commit9036240993b3c7d76e2403a71780c46f964ec0d0 (patch)
tree7d84349fd34d97e30c71a14e54c8698e104e5175 /sys/dev/cxgb/common
parent78bc7eec0d82029231825ee8782ab2920b2c66a5 (diff)
downloadsrc-9036240993b3c7d76e2403a71780c46f964ec0d0.tar.gz
src-9036240993b3c7d76e2403a71780c46f964ec0d0.zip
Fix a bug with the ael1006 PHY. The bug shows up as persistent but incomplete
packet loss, of between 10-30%. The fix is to put the PHY into and take it out of local loopback mode when resetting the interface. Obtained from: Chelsio Inc. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=185620
Diffstat (limited to 'sys/dev/cxgb/common')
-rw-r--r--sys/dev/cxgb/common/cxgb_ael1002.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/cxgb/common/cxgb_ael1002.c b/sys/dev/cxgb/common/cxgb_ael1002.c
index 99bfb7611427..55c642155dc0 100644
--- a/sys/dev/cxgb/common/cxgb_ael1002.c
+++ b/sys/dev/cxgb/common/cxgb_ael1002.c
@@ -205,6 +205,16 @@ static int ael1006_reset(struct cphy *phy, int wait)
t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out);
msleep(125);
t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait);
+
+ /* Phy loopback work around for ael1006 */
+ /* Soft reset phy by toggling loopback */
+ msleep(125);
+ /* Put phy into local loopback */
+ t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 0, 1);
+ msleep(125);
+ /* Take phy out of local loopback */
+ t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 0);
+
return 0;
}