]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: Disable AN KR work-around for BCM57810
authorYaniv Rosner <yanivr@broadcom.com>
Tue, 17 Jan 2012 02:33:29 +0000 (02:33 +0000)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 14:41:15 +0000 (22:41 +0800)
Disable the work-around for the autoneg KR of the BCM57810 in case the Warpcore version is 0xD108 and above, which fixes this problem.

(cherry picked from commit 6ab48a5c86ce778188c173818cb2f1644526e962)
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/bnx2x/bnx2x_link.c

index 9da9f2b8306ff3f4d6a4c65ea38aabcb8a68d248..48ecefbbd98f18de6ad628d330b9bde87e95bf88 100644 (file)
@@ -3757,7 +3757,15 @@ static void bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy,
        /* Advertise pause */
        bnx2x_ext_phy_set_pause(params, phy, vars);
 
-       vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY;
+       /*
+        * Set KR Autoneg Work-Around flag for Warpcore version older than D108
+        */
+       bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
+                       MDIO_WC_REG_UC_INFO_B1_VERSION, &val16);
+       if (val16 < 0xd108) {
+               DP(NETIF_MSG_LINK, "Enable AN KR work-around\n");
+               vars->rx_tx_asic_rst = MAX_KR_LINK_RETRY;
+       }
 
        bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
                        MDIO_WC_REG_DIGITAL5_MISC7, &val16);