[4/4] be2net: disable TX in be_close()

Message ID 1368014750-25065-5-git-send-email-sathya.perla@emulex.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Sathya Perla May 8, 2013, 12:05 p.m.
be_close() followed by be_clear() is called as a part of cleanup in the
EEH/AER flow.  This patch stops TX in be_close() before cleaning/freeing
up the TX queues in be_clear(). This prevents be_xmit() from being called
while TX queues no longer exist.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
 drivers/net/ethernet/emulex/benet/be_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 792d838..a444110 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2559,6 +2559,7 @@  static int be_close(struct net_device *netdev)
 	 * all tx skbs are freed.
+	netif_tx_disable(netdev);
@@ -2667,6 +2668,7 @@  static int be_open(struct net_device *netdev)
 	if (!status)
 		be_link_status_update(adapter, link_status);
+	netif_tx_start_all_queues(netdev);
 	return 0;