From: Mahesh Bandewar Date: Wed, 30 Jan 2013 07:00:12 +0000 (+0000) Subject: bnx2x: Force link UP when the interface is in LOOPBACK mode X-Git-Tag: v3.12-rc1~1418^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7614fe8888840a78ad4730d82adcc679c1af1894;p=kernel%2Fkernel-generic.git bnx2x: Force link UP when the interface is in LOOPBACK mode 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 Acked-by: Eilon Greenstein Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 859df75..c6da77f 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c @@ -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,