aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
diff options
context:
space:
mode:
authorBarak Witkowski <barak@broadcom.com>2012-12-05 18:04:03 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-07 12:53:49 -0500
commitc63da990cd63153ce5203f96822638a7ef0f9bf7 (patch)
treeff99d59bf8d08e978acc6aef42c0d684613689bc /drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
parent6ded7cd605502eff7341bbd912ebc90c3674c764 (diff)
bnx2x: Prevent link flaps when booting from SAN.
It is possible that the driver is configured to operate with a certain link configuration which differs from the link's configuration during boot from SAN - this would cause the driver to flap the link. Said flap may be missed by specific switches, causing dcbx convergence to be too long and boot sequence to fail. Convergence is longer because switch ignores new dcbx packets due to counters mismatch, as only host side reset the counters due to the link flap. This patch causes the driver to ignore user's initial configuration during boot from SAN, and continues with the existing link configuration. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@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.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 3e7d8246c501..09096b43a6e9 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -254,6 +254,12 @@ static int bnx2x_check_lfa(struct link_params *params)
254 if (!(link_status & LINK_STATUS_LINK_UP)) 254 if (!(link_status & LINK_STATUS_LINK_UP))
255 return LFA_LINK_DOWN; 255 return LFA_LINK_DOWN;
256 256
257 /* if loaded after BOOT from SAN, don't flap the link in any case and
258 * rely on link set by preboot driver
259 */
260 if (params->feature_config_flags & FEATURE_CONFIG_BOOT_FROM_SAN)
261 return 0;
262
257 /* Verify that loopback mode is not set */ 263 /* Verify that loopback mode is not set */
258 if (params->loopback_mode) 264 if (params->loopback_mode)
259 return LFA_LOOPBACK_ENABLED; 265 return LFA_LOOPBACK_ENABLED;