提交 48e9989e 编写于 作者: A Ajit Khaparde 提交者: David S. Miller

be2net: change to show correct physical link status

link status is wrongly displayed under certain circumstances.
This change fixes it.
Signed-off-by: NSomnath K <somnathk@serverengines.com>
Signed-off-by: NAjit Khaparde <ajitk@serverengines.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7c185276
...@@ -322,10 +322,11 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -322,10 +322,11 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
int status; int status;
u16 intf_type; u16 intf_type;
if (adapter->link_speed < 0) { if ((adapter->link_speed < 0) || (!(netdev->flags & IFF_UP))) {
status = be_cmd_link_status_query(adapter, &link_up, status = be_cmd_link_status_query(adapter, &link_up,
&mac_speed, &link_speed); &mac_speed, &link_speed);
be_link_status_update(adapter, link_up);
/* link_speed is in units of 10 Mbps */ /* link_speed is in units of 10 Mbps */
if (link_speed) { if (link_speed) {
ecmd->speed = link_speed*10; ecmd->speed = link_speed*10;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册