aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_link.c
diff options
context:
space:
mode:
authorYaniv Rosner <yaniv.rosner@broadcom.com>2010-11-01 01:32:34 -0400
committerDavid S. Miller <davem@davemloft.net>2010-11-01 09:21:37 -0400
commitcf1d972cb6393b9b042289739111773226861d6c (patch)
treeb6022e11a005e470815a61473d2a194724ddf299 /drivers/net/bnx2x/bnx2x_link.c
parent6a71bbe04c9ee9a6e892e584a09615c1dbf35edc (diff)
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>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_link.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_link.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
index fc637ce7f57..fdd7e034946 100644
--- a/drivers/net/bnx2x/bnx2x_link.c
+++ b/drivers/net/bnx2x/bnx2x_link.c
@@ -6938,7 +6938,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
6938 u8 reset_ext_phy) 6938 u8 reset_ext_phy)
6939{ 6939{
6940 struct bnx2x *bp = params->bp; 6940 struct bnx2x *bp = params->bp;
6941 u8 phy_index, port = params->port; 6941 u8 phy_index, port = params->port, clear_latch_ind = 0;
6942 DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port); 6942 DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port);
6943 /* disable attentions */ 6943 /* disable attentions */
6944 vars->link_status = 0; 6944 vars->link_status = 0;
@@ -6976,9 +6976,18 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars,
6976 params->phy[phy_index].link_reset( 6976 params->phy[phy_index].link_reset(
6977 &params->phy[phy_index], 6977 &params->phy[phy_index],
6978 params); 6978 params);
6979 if (params->phy[phy_index].flags &
6980 FLAGS_REARM_LATCH_SIGNAL)
6981 clear_latch_ind = 1;
6979 } 6982 }
6980 } 6983 }
6981 6984
6985 if (clear_latch_ind) {
6986 /* Clear latching indication */
6987 bnx2x_rearm_latch_signal(bp, port, 0);
6988 bnx2x_bits_dis(bp, NIG_REG_LATCH_BC_0 + port*4,
6989 1 << NIG_LATCH_BC_ENABLE_MI_INT);
6990 }
6982 if (params->phy[INT_PHY].link_reset) 6991 if (params->phy[INT_PHY].link_reset)
6983 params->phy[INT_PHY].link_reset( 6992 params->phy[INT_PHY].link_reset(
6984 &params->phy[INT_PHY], params); 6993 &params->phy[INT_PHY], params);