Skip to content

Commit

Permalink
bnx2x: Fix self test of BCM57800
Browse files Browse the repository at this point in the history
Fix the MAC test of the 1G port of the BCM57800 to use the UMAC instead of the XMAC.

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>
  • Loading branch information
Yaniv Rosner authored and David S. Miller committed Nov 29, 2011
1 parent 6db5193 commit 3291133
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1749,8 +1749,18 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode)
return -EINVAL;
break;
case BNX2X_MAC_LOOPBACK:
bp->link_params.loopback_mode = CHIP_IS_E3(bp) ?
LOOPBACK_XMAC : LOOPBACK_BMAC;
if (CHIP_IS_E3(bp)) {
int cfg_idx = bnx2x_get_link_cfg_idx(bp);
if (bp->port.supported[cfg_idx] &
(SUPPORTED_10000baseT_Full |
SUPPORTED_20000baseMLD2_Full |
SUPPORTED_20000baseKR2_Full))
bp->link_params.loopback_mode = LOOPBACK_XMAC;
else
bp->link_params.loopback_mode = LOOPBACK_UMAC;
} else
bp->link_params.loopback_mode = LOOPBACK_BMAC;

bnx2x_phy_init(&bp->link_params, &bp->link_vars);
break;
default:
Expand Down

0 comments on commit 3291133

Please sign in to comment.