Skip to contentSkip to conversation

be2net: change to show correct physical link status

PATCH Applied Ajit Khaparde 2 participants 2 messages Jul 29, 2010 – Jul 31, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 be2net: change to show correct physical link status

link status is wrongly displayed under certain circumstances. This change fixes it.

---
 drivers/net/benet/be_ethtool.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/benet/be_ethtool.c +2 -1
index c0ade24..cd16243 100644
@@ -322,10 +322,11 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 	int status;
 	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,
 						&mac_speed, &link_speed);
 
+		be_link_status_update(adapter, link_up);
 		/* link_speed is in units of 10 Mbps */
 		if (link_speed) {
 			ecmd->speed = link_speed*10;
Signature · 1 line
1.7.0.4