bnx2x: Clear latch indication on link reset

When using latch indication for link change notification, need to
clear it when port is unloaded, otherwise it might generate false
indication on next load.

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>
This commit is contained in:
Yaniv Rosner 2010-11-01 05:32:34 +00:00 коммит произвёл David S. Miller
Родитель 6a71bbe04c
Коммит cf1d972cb6
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -6938,7 +6938,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
u8 reset_ext_phy) u8 reset_ext_phy)
{ {
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
u8 phy_index, port = params->port; u8 phy_index, port = params->port, clear_latch_ind = 0;
DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port); DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port);
/* disable attentions */ /* disable attentions */
vars->link_status = 0; vars->link_status = 0;
@ -6976,9 +6976,18 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
params->phy[phy_index].link_reset( params->phy[phy_index].link_reset(
&params->phy[phy_index], &params->phy[phy_index],
params); params);
if (params->phy[phy_index].flags &
FLAGS_REARM_LATCH_SIGNAL)
clear_latch_ind = 1;
} }
} }
if (clear_latch_ind) {
/* Clear latching indication */
bnx2x_rearm_latch_signal(bp, port, 0);
bnx2x_bits_dis(bp, NIG_REG_LATCH_BC_0 + port*4,
1 << NIG_LATCH_BC_ENABLE_MI_INT);
}
if (params->phy[INT_PHY].link_reset) if (params->phy[INT_PHY].link_reset)
params->phy[INT_PHY].link_reset( params->phy[INT_PHY].link_reset(
&params->phy[INT_PHY], params); &params->phy[INT_PHY], params);