diff options
author | Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> | 2013-04-18 08:10:04 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-18 18:54:59 (GMT) |
commit | a4325ea242d9d0889cb7e86811fef3ff3d714d29 (patch) | |
tree | 332ec841ecef7d4c3bdfa286640b8b815c57c386 /drivers | |
parent | 026ac677414c62550269d53907ea47412ec2bd81 (diff) | |
download | linux-fsl-qoriq-a4325ea242d9d0889cb7e86811fef3ff3d714d29.tar.xz |
qlcnic: Stop traffic before performing loopback test
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index cd5ae88..284d628 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c @@ -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); |