Commit 092dfcf3 authored by Shahed Shaikh's avatar Shahed Shaikh Committed by David S. Miller

qlcnic: Fix loopback test failure

Driver was returning from link event handler without
setting linkup variable
Signed-off-by: default avatarShahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 060d0564
...@@ -683,12 +683,17 @@ void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup) ...@@ -683,12 +683,17 @@ void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup)
adapter->ahw->linkup = 0; adapter->ahw->linkup = 0;
netif_carrier_off(netdev); netif_carrier_off(netdev);
} else if (!adapter->ahw->linkup && linkup) { } else if (!adapter->ahw->linkup && linkup) {
/* Do not advertise Link up if the port is in loopback mode */ adapter->ahw->linkup = 1;
if (qlcnic_83xx_check(adapter) && adapter->ahw->lb_mode)
/* Do not advertise Link up to the stack if device
* is in loopback mode
*/
if (qlcnic_83xx_check(adapter) && adapter->ahw->lb_mode) {
netdev_info(netdev, "NIC Link is up for loopback test\n");
return; return;
}
netdev_info(netdev, "NIC Link is up\n"); netdev_info(netdev, "NIC Link is up\n");
adapter->ahw->linkup = 1;
netif_carrier_on(netdev); netif_carrier_on(netdev);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment