netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yaniv Rosner <yanivr@broadcom.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Yaniv Rosner <yanivr@broadcom.com>,
	Ariel Elior <ariele@broadcom.com>
Subject: [PATCH net 4/5] bnx2x: Fix incorrect link-up report
Date: Wed, 1 Jan 2014 11:06:44 +0200	[thread overview]
Message-ID: <1388567205-20210-5-git-send-email-yanivr@broadcom.com> (raw)
In-Reply-To: <1388567205-20210-1-git-send-email-yanivr@broadcom.com>

Fix a problem where link is reported to be up when SFP+ module is plugged in
without cable. This occurs with specific module types which may generate
temporary TX_FAULT indication. Solution is to avoid changing any link parameters
when checking TX_FAULT indication while physical link is down.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 68417e1..998cce3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -13360,6 +13360,10 @@ static u8 bnx2x_analyze_link_error(struct link_params *params,
 	DP(NETIF_MSG_LINK, "Link changed:[%x %x]->%x\n", vars->link_up,
 	   old_status, status);
 
+	/* Do not touch the link in case physical link down */
+	if ((vars->phy_flags & PHY_PHYSICAL_LINK_FLAG) == 0)
+		return 1;
+
 	/* a. Update shmem->link_status accordingly
 	 * b. Update link_vars->link_up
 	 */
-- 
1.7.1

  parent reply	other threads:[~2014-01-01  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01  9:06 [PATCH net 0/5] bnx2x: Link fixes Yaniv Rosner
2014-01-01  9:06 ` [PATCH net 1/5] bnx2x: Fix 578xx-KR 1G link Yaniv Rosner
2014-01-01  9:06 ` [PATCH net 2/5] bnx2x: Fix passive DAC cable detection Yaniv Rosner
2014-01-01  9:06 ` [PATCH net 3/5] bnx2x: Fix Duplex setting for 54618se Yaniv Rosner
2014-01-01  9:06 ` Yaniv Rosner [this message]
2014-01-01  9:06 ` [PATCH net 5/5] bnx2x: Fix KR2 work-around detection of BCM8073 Yaniv Rosner
2014-01-02  3:10 ` [PATCH net 0/5] bnx2x: Link fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388567205-20210-5-git-send-email-yanivr@broadcom.com \
    --to=yanivr@broadcom.com \
    --cc=ariele@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).