summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2013-03-07 17:27:33 +0400
committerDavid S. Miller <davem@davemloft.net>2013-03-08 09:35:44 +0400
commit5f3347e6e75768985a088d959c49fb66263087b6 (patch)
tree4c78b24ff9b1ee3efcdf20c1d458c70ca14a54b2 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
parent87ab7f6f2874f1115817e394a7ed2dea1c72549e (diff)
downloadlinux-5f3347e6e75768985a088d959c49fb66263087b6.tar.xz
bnx2x: Fix intermittent long KR2 link up time
When a KR2 device is connected to a KR link-partner, sometimes it requires disabling KR2 for the link to come up. To get a KR2 link up later, in case no base pages are seen, the KR2 is restored. The problem was that some link partners cleared their advertised BP/NP after around two seconds, causing the driver to disable/enable KR2 link all the time. The fix was to wait at least 5 seconds before checking KR2 recovery. 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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
index be5c195d03dd..f92fcf71be04 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
@@ -342,7 +342,8 @@ struct link_vars {
u32 link_status;
u32 eee_status;
u8 fault_detected;
- u8 rsrv1;
+ u8 check_kr2_recovery_cnt;
+#define CHECK_KR2_RECOVERY_CNT 5
u16 periodic_flags;
#define PERIODIC_FLAGS_LINK_EVENT 0x0001