From: Shahed Shaikh <shahed.shaikh@qlogic.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <Dept_NX_Linux_NIC_Driver@qlogic.com>,
Rajesh Borundia <rajesh.borundia@qlogic.com>
Subject: [PATCH net 6/8] qlcnic: Fix link speed display for 82xx adapter
Date: Fri, 2 Aug 2013 23:15:59 -0400 [thread overview]
Message-ID: <1375499761-21141-7-git-send-email-shahed.shaikh@qlogic.com> (raw)
In-Reply-To: <1375499761-21141-1-git-send-email-shahed.shaikh@qlogic.com>
From: Rajesh Borundia <rajesh.borundia@qlogic.com>
o Do not obtain link speed from register when adapter
link is down.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
---
.../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 7a58e39..ac42cde 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -301,9 +301,13 @@ int qlcnic_82xx_get_settings(struct qlcnic_adapter *adapter,
}
if (netif_running(adapter->netdev) && ahw->has_link_events) {
- reg = QLCRD32(adapter, P3P_LINK_SPEED_REG(pcifn));
- speed = P3P_LINK_SPEED_VAL(pcifn, reg);
- ahw->link_speed = speed * P3P_LINK_SPEED_MHZ;
+ if (ahw->linkup) {
+ reg = QLCRD32(adapter,
+ P3P_LINK_SPEED_REG(pcifn));
+ speed = P3P_LINK_SPEED_VAL(pcifn, reg);
+ ahw->link_speed = speed * P3P_LINK_SPEED_MHZ;
+ }
+
ethtool_cmd_speed_set(ecmd, ahw->link_speed);
ecmd->autoneg = ahw->link_autoneg;
ecmd->duplex = ahw->link_duplex;
--
1.5.6
next prev parent reply other threads:[~2013-08-03 4:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-03 3:15 [PATCH net 0/8] qlcnic: Bug fixes Shahed Shaikh
2013-08-03 3:15 ` [PATCH net 1/8] qlcnic: Fix MAC address filter issue on 82xx adapter Shahed Shaikh
2013-08-03 3:15 ` [PATCH net 2/8] qlcnic: Fix ingress MAC learning Shahed Shaikh
2013-08-03 3:15 ` [PATCH net 3/8] qlcnic: Free up memory in error path Shahed Shaikh
2013-08-03 3:15 ` [PATCH net 4/8] qlcnic: Removed adapter series name from warning messages Shahed Shaikh
2013-08-03 3:15 ` [PATCH net 5/8] qlcnic: Fix external loopback test Shahed Shaikh
2013-08-03 3:15 ` Shahed Shaikh [this message]
2013-08-03 3:16 ` [PATCH net 7/8] qlcnic: Fix link speed and duplex display for 83xx adapter Shahed Shaikh
2013-08-03 3:16 ` [PATCH net 8/8] qlcnic: Fix for flash update failure on " Shahed Shaikh
2013-08-03 19:03 ` [PATCH net 0/8] qlcnic: Bug 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=1375499761-21141-7-git-send-email-shahed.shaikh@qlogic.com \
--to=shahed.shaikh@qlogic.com \
--cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rajesh.borundia@qlogic.com \
/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).