Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9169323 authored by Yaniv Rosner's avatar Yaniv Rosner Committed by David S. Miller
Browse files

bnx2x: Fix SFP+ misconfiguration in iSCSI boot scenario



Fix a problem in which iSCSI-boot installation fails when switching SFP+ boot
port and moving the SFP+ module prior to boot. The SFP+ insertion triggers an
interrupt which configures the SFP+ module wrongly before interface is loaded.

Signed-off-by: default avatarYaniv Rosner <yanivr@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f3347e6
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -8647,7 +8647,9 @@ void bnx2x_handle_module_detect_int(struct link_params *params)
						MDIO_WC_DEVAD,
						MDIO_WC_DEVAD,
						MDIO_WC_REG_DIGITAL5_MISC6,
						MDIO_WC_REG_DIGITAL5_MISC6,
						&rx_tx_in_reset);
						&rx_tx_in_reset);
				if (!rx_tx_in_reset) {
				if ((!rx_tx_in_reset) &&
				    (params->link_flags &
				     PHY_INITIALIZED)) {
					bnx2x_warpcore_reset_lane(bp, phy, 1);
					bnx2x_warpcore_reset_lane(bp, phy, 1);
					bnx2x_warpcore_config_sfi(phy, params);
					bnx2x_warpcore_config_sfi(phy, params);
					bnx2x_warpcore_reset_lane(bp, phy, 0);
					bnx2x_warpcore_reset_lane(bp, phy, 0);
@@ -12528,6 +12530,7 @@ int bnx2x_phy_init(struct link_params *params, struct link_vars *vars)
	vars->mac_type = MAC_TYPE_NONE;
	vars->mac_type = MAC_TYPE_NONE;
	vars->phy_flags = 0;
	vars->phy_flags = 0;
	vars->check_kr2_recovery_cnt = 0;
	vars->check_kr2_recovery_cnt = 0;
	params->link_flags = PHY_INITIALIZED;
	/* Driver opens NIG-BRB filters */
	/* Driver opens NIG-BRB filters */
	bnx2x_set_rx_filter(params, 1);
	bnx2x_set_rx_filter(params, 1);
	/* Check if link flap can be avoided */
	/* Check if link flap can be avoided */
@@ -12692,6 +12695,7 @@ int bnx2x_lfa_reset(struct link_params *params,
	struct bnx2x *bp = params->bp;
	struct bnx2x *bp = params->bp;
	vars->link_up = 0;
	vars->link_up = 0;
	vars->phy_flags = 0;
	vars->phy_flags = 0;
	params->link_flags &= ~PHY_INITIALIZED;
	if (!params->lfa_base)
	if (!params->lfa_base)
		return bnx2x_link_reset(params, vars, 1);
		return bnx2x_link_reset(params, vars, 1);
	/*
	/*
+1 −0
Original line number Original line Diff line number Diff line
@@ -309,6 +309,7 @@ struct link_params {
				req_flow_ctrl is set to AUTO */
				req_flow_ctrl is set to AUTO */
	u16 link_flags;
	u16 link_flags;
#define LINK_FLAGS_INT_DISABLED		(1<<0)
#define LINK_FLAGS_INT_DISABLED		(1<<0)
#define PHY_INITIALIZED		(1<<1)
	u32 lfa_base;
	u32 lfa_base;
};
};