Skip to content

Commit

Permalink
qlcnic: Stop traffic before performing loopback test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jitendra Kalsaria authored and David S. Miller committed Apr 18, 2013
1 parent 026ac67 commit a4325ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a4325ea

Please sign in to comment.