Skip to content

Commit

Permalink
be2net: disable TX in be_close()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sathya Perla authored and David S. Miller committed May 8, 2013
1 parent 3f5dffe commit fba8755
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,7 @@ static int be_close(struct net_device *netdev)
* all tx skbs are freed.
*/
be_tx_compl_clean(adapter);
netif_tx_disable(netdev);

be_rx_qs_destroy(adapter);

Expand Down Expand Up @@ -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);
be_roce_dev_open(adapter);
return 0;
err:
Expand Down

0 comments on commit fba8755

Please sign in to comment.