[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1359510715-12099-1-git-send-email-maheshb@google.com>
Date: Tue, 29 Jan 2013 17:51:55 -0800
From: Mahesh Bandewar <maheshb@...gle.com>
To: Eilon Greenstein <eilong@...adcom.com>,
David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Mahesh Bandewar <maheshb@...gle.com>
Subject: [PATCH] net-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 <maheshb@...gle.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 859df751345e..91af55586bbc 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -4748,6 +4748,11 @@ 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 loopback mode */
+ if (bp->link_params.loopback_mode != LOOPBACK_NONE)
+ 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,
--
1.8.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists