提交 beb3d3a4 编写于 作者: R Rajesh Borundia 提交者: David S. Miller

qlcnic: Fix link speed display for 82xx adapter

o Do not obtain link speed from register when adapter
  link is down.
Signed-off-by: NRajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: NShahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2e3ea7e7
...@@ -301,9 +301,13 @@ int qlcnic_82xx_get_settings(struct qlcnic_adapter *adapter, ...@@ -301,9 +301,13 @@ int qlcnic_82xx_get_settings(struct qlcnic_adapter *adapter,
} }
if (netif_running(adapter->netdev) && ahw->has_link_events) { if (netif_running(adapter->netdev) && ahw->has_link_events) {
reg = QLCRD32(adapter, P3P_LINK_SPEED_REG(pcifn)); if (ahw->linkup) {
speed = P3P_LINK_SPEED_VAL(pcifn, reg); reg = QLCRD32(adapter,
ahw->link_speed = speed * P3P_LINK_SPEED_MHZ; 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); ethtool_cmd_speed_set(ecmd, ahw->link_speed);
ecmd->autoneg = ahw->link_autoneg; ecmd->autoneg = ahw->link_autoneg;
ecmd->duplex = ahw->link_duplex; ecmd->duplex = ahw->link_duplex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册