ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Thu, 15 Jun 2017 04:50:06 +0000 (23:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jun 2017 18:29:00 +0000 (14:29 -0400)
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>
drivers/net/ethernet/ibm/ibmvnic.c

index 99c552a79e9d2d788e4783972300fac48885372e..134ab295c1d6ef22c9e92ba2c68cf71f9b6bef10 100644 (file)
@@ -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) {