ibmvnic: Mark NAPI flag as disabled when released
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 23 May 2018 18:37:55 +0000 (13:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 02:19:25 +0000 (22:19 -0400)
Set adapter NAPI state as disabled if they are removed. This will allow
them to be enabled again if reallocated in case of a hard reset.

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 4bb4646a5f92f5617b6a3306a5002e180fc9cca1..eabc1e445137aeb4a73a16b906e38f531184bde7 100644 (file)
@@ -789,6 +789,7 @@ static void release_napi(struct ibmvnic_adapter *adapter)
        kfree(adapter->napi);
        adapter->napi = NULL;
        adapter->num_active_rx_napi = 0;
+       adapter->napi_enabled = false;
 }
 
 static int ibmvnic_login(struct net_device *netdev)