Skip to content

Commit

Permalink
ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close
Browse files Browse the repository at this point in the history
Use netif_tx_disable to guarantee that TX queues are disabled
when __ibmvnic_close is called by the device reset routine.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Falcon authored and David S. Miller committed Jun 15, 2017
1 parent c3e53b9 commit 4c2687a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,13 @@ static int __ibmvnic_close(struct net_device *netdev)
int i;

adapter->state = VNIC_CLOSING;
netif_tx_stop_all_queues(netdev);

/* ensure that transmissions are stopped if called by do_reset */
if (adapter->resetting)
netif_tx_disable(netdev);
else
netif_tx_stop_all_queues(netdev);

ibmvnic_napi_disable(adapter);

if (adapter->tx_scrq) {
Expand Down

0 comments on commit 4c2687a

Please sign in to comment.