aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2x/bnx2x_link.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c
index aa9958e37445..0a7091d3de29 100644
--- a/drivers/net/bnx2x/bnx2x_link.c
+++ b/drivers/net/bnx2x/bnx2x_link.c
@@ -1667,10 +1667,20 @@ static void bnx2x_xmac_disable(struct link_params *params)
1667{ 1667{
1668 u8 port = params->port; 1668 u8 port = params->port;
1669 struct bnx2x *bp = params->bp; 1669 struct bnx2x *bp = params->bp;
1670 u32 xmac_base = (port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; 1670 u32 pfc_ctrl, xmac_base = (port) ? GRCBASE_XMAC1 : GRCBASE_XMAC0;
1671 1671
1672 if (REG_RD(bp, MISC_REG_RESET_REG_2) & 1672 if (REG_RD(bp, MISC_REG_RESET_REG_2) &
1673 MISC_REGISTERS_RESET_REG_2_XMAC) { 1673 MISC_REGISTERS_RESET_REG_2_XMAC) {
1674 /*
1675 * Send an indication to change the state in the NIG back to XON
1676 * Clearing this bit enables the next set of this bit to get
1677 * rising edge
1678 */
1679 pfc_ctrl = REG_RD(bp, xmac_base + XMAC_REG_PFC_CTRL_HI);
1680 REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI,
1681 (pfc_ctrl & ~(1<<1)));
1682 REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI,
1683 (pfc_ctrl | (1<<1)));
1674 DP(NETIF_MSG_LINK, "Disable XMAC on port %x\n", port); 1684 DP(NETIF_MSG_LINK, "Disable XMAC on port %x\n", port);
1675 REG_WR(bp, xmac_base + XMAC_REG_CTRL, 0); 1685 REG_WR(bp, xmac_base + XMAC_REG_CTRL, 0);
1676 usleep_range(1000, 1000); 1686 usleep_range(1000, 1000);