diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2013-08-02 23:15:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-03 12:03:03 -0700 |
commit | beb3d3a4d4830b1e090eedef0d0d7870639f09e0 (patch) | |
tree | 591f4c63a1b531e76071c845a2ae854b53617738 | |
parent | 2e3ea7e763f2ce33bbede1cd5cb8d4cd60f3e11a (diff) | |
download | blackbird-obmc-linux-beb3d3a4d4830b1e090eedef0d0d7870639f09e0.tar.gz blackbird-obmc-linux-beb3d3a4d4830b1e090eedef0d0d7870639f09e0.zip |
qlcnic: Fix link speed display for 82xx adapter
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/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 7a58e390e935..ac42cde47888 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; |