]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-beck.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_link.c
index 6cc6c6374a924524b8e43b4fc75c8de85964fcc4..40f58d73de78ae297f38fe7397d3cc35eaf7a28e 100644 (file)
@@ -13481,13 +13481,7 @@ static void bnx2x_check_kr2_wa(struct link_params *params,
 {
        struct bnx2x *bp = params->bp;
        u16 base_page, next_page, not_kr2_device, lane;
-       int sigdet = bnx2x_warpcore_get_sigdet(phy, params);
-
-       if (!sigdet) {
-               if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE))
-                       bnx2x_kr2_recovery(params, vars, phy);
-               return;
-       }
+       int sigdet;
 
        /* Once KR2 was disabled, wait 5 seconds before checking KR2 recovery
         * Since some switches tend to reinit the AN process and clear the
@@ -13498,6 +13492,16 @@ static void bnx2x_check_kr2_wa(struct link_params *params,
                vars->check_kr2_recovery_cnt--;
                return;
        }
+
+       sigdet = bnx2x_warpcore_get_sigdet(phy, params);
+       if (!sigdet) {
+               if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {
+                       bnx2x_kr2_recovery(params, vars, phy);
+                       DP(NETIF_MSG_LINK, "No sigdet\n");
+               }
+               return;
+       }
+
        lane = bnx2x_get_warpcore_lane(phy, params);
        CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK,
                          MDIO_AER_BLOCK_AER_REG, lane);