summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
diff options
context:
space:
mode:
authorDmitry Kravkov2013-05-22 23:21:50 +0200
committerDavid S. Miller2013-05-24 03:49:30 +0200
commit178135c11611c02161c5b64aeba341d777f2d64d (patch)
treece8312805730d2c30563c3a64fe02ed8cfaa9752 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
parentbnx2x: Add Private Flags Support (diff)
downloadkernel-qcow2-linux-178135c11611c02161c5b64aeba341d777f2d64d.tar.gz
kernel-qcow2-linux-178135c11611c02161c5b64aeba341d777f2d64d.tar.xz
kernel-qcow2-linux-178135c11611c02161c5b64aeba341d777f2d64d.zip
bnx2x: Link-flap avoidance in switch dependent mode
As part of the previous unload flow, probed devices will reset the chip in order to clean the remains of the UNDI driver. As a result, it's possible for the FW to toggle the link. This toggling can prove fatal, as long periods without link can cause the filesystem mount to fail as the storage protocol timeouts. This has been observed against particular switches with long link re-establishment time. This patch informs FW during the reset period that the link should not be toggled - the FW will keep it alive until some interface will load and claim the link as its own. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@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_cmn.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 6cc5101fa96b..f4d1c08c67d3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2183,6 +2183,8 @@ alloc_mem_err:
/* send load request to mcp and analyze response */
static int bnx2x_nic_load_request(struct bnx2x *bp, u32 *load_code)
{
+ u32 param;
+
/* init fw_seq */
bp->fw_seq =
(SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) &
@@ -2195,9 +2197,13 @@ static int bnx2x_nic_load_request(struct bnx2x *bp, u32 *load_code)
DRV_PULSE_SEQ_MASK);
BNX2X_DEV_INFO("drv_pulse 0x%x\n", bp->fw_drv_pulse_wr_seq);
+ param = DRV_MSG_CODE_LOAD_REQ_WITH_LFA;
+
+ if (IS_MF_SD(bp) && bnx2x_port_after_undi(bp))
+ param |= DRV_MSG_CODE_LOAD_REQ_FORCE_LFA;
+
/* load request */
- (*load_code) = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ,
- DRV_MSG_CODE_LOAD_REQ_WITH_LFA);
+ (*load_code) = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, param);
/* if mcp fails to respond we must abort */
if (!(*load_code)) {