Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2008 20:32:53 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185620 - head/sys/dev/cxgb/common
Message-ID:  <200812042032.mB4KWrBG033880@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gnn
Date: Thu Dec  4 20:32:53 2008
New Revision: 185620
URL: http://svn.freebsd.org/changeset/base/185620

Log:
  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

Modified:
  head/sys/dev/cxgb/common/cxgb_ael1002.c

Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c
==============================================================================
--- head/sys/dev/cxgb/common/cxgb_ael1002.c	Thu Dec  4 20:04:25 2008	(r185619)
+++ head/sys/dev/cxgb/common/cxgb_ael1002.c	Thu Dec  4 20:32:53 2008	(r185620)
@@ -205,6 +205,16 @@ static int ael1006_reset(struct cphy *ph
 	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;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812042032.mB4KWrBG033880>