Skip to content

Commit

Permalink
bnx2x: Force link UP when the interface is in LOOPBACK mode
Browse files Browse the repository at this point in the history
When the interface does not have carrier but when it's put into
loopback mode (for tests), it does not make sense to not have
the carrier. So force it!

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mahesh Bandewar authored and David S. Miller committed Feb 3, 2013
1 parent daef226 commit 7614fe8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -4748,6 +4748,12 @@ void bnx2x_link_status_update(struct link_params *params,
vars->link_status = REG_RD(bp, params->shmem_base +
offsetof(struct shmem_region,
port_mb[port].link_status));

/* Force link UP in non LOOPBACK_EXT loopback mode(s) */
if (bp->link_params.loopback_mode != LOOPBACK_NONE &&
bp->link_params.loopback_mode != LOOPBACK_EXT)
vars->link_status |= LINK_STATUS_LINK_UP;

if (bnx2x_eee_has_cap(params))
vars->eee_status = REG_RD(bp, params->shmem2_base +
offsetof(struct shmem2_region,
Expand Down

0 comments on commit 7614fe8

Please sign in to comment.