]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
qlcnic: Stop traffic before performing loopback test
authorJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Thu, 18 Apr 2013 08:10:04 +0000 (08:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Apr 2013 18:54:59 +0000 (14:54 -0400)
Before conducting loopback test by sending packets, driver should stop transmit
queue and turn off carrier.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c

index cd5ae8813cb3967537bc047a475db69329993736..284d6288888ccdcd9adb866211cf8f70f63111cb 100644 (file)
@@ -1500,6 +1500,12 @@ int qlcnic_83xx_loopback_test(struct net_device *netdev, u8 mode)
                }
        } while ((adapter->ahw->linkup && ahw->has_link_events) != 1);
 
+       /* Make sure carrier is off and queue is stopped during loopback */
+       if (netif_running(netdev)) {
+               netif_carrier_off(netdev);
+               netif_stop_queue(netdev);
+       }
+
        ret = qlcnic_do_lb_test(adapter, mode);
 
        qlcnic_83xx_clear_lb_mode(adapter, mode);