[linux-yocto] [PATCH 36/89] drivers/net: Get the latest working with the built-in switch on Amarillo.

Paul Butler butler.paul at gmail.com
Sun Oct 27 12:33:01 PDT 2013


From: John Jacques <john.jacques at lsi.com>

Signed-off-by: John Jacques <john.jacques at lsi.com>
---
 drivers/net/ethernet/lsi/lsi_acp_net.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c b/drivers/net/ethernet/lsi/lsi_acp_net.c
index e6051b1..c8b923b 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -2117,21 +2117,22 @@ static int phy_enable_(struct net_device *device)
 	  unsigned short value;
 	  int rc;
 
+        /* Access Shadow reg 0x1d */
 	  rc = phy_read_(0x1e, PHY_BCM_TEST_REG, &value);
-
-	  /* Access Shadow reg 0x1d */
-	  value = value | 0x80;
+        value = value | 0x80;
 	  rc |= phy_write_(0x1e, PHY_BCM_TEST_REG, value);
 
-	  /* Set RX FIFO size to 0x7 */
+        /* Set RX FIFO size to 0x7 */
 	  rc |= phy_write_(0x1e, PHY_AUXILIARY_MODE3, 0x7);
 
-	  /* Back to normal registers. */
-	  value &= ~0x80;
-	  rc |= phy_write_(0x1e, PHY_BCM_TEST_REG, value);
+		/* Access Normal Registers */
+		rc = phy_read_(0x1e, PHY_BCM_TEST_REG, &value);
+		value = value & ~0x80;
+		rc |= phy_write_(0x1e, PHY_BCM_TEST_REG, value);
 
-	  if (rc != 0)
-	    return rc;
+		if (rc != 0) {
+			return rc;
+		}	 
 	}
 
 	return 0;
-- 
1.8.3.4




More information about the linux-yocto mailing list