]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ibmvnic: Do not disable device during failover or partition migration
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 7 Mar 2018 23:51:47 +0000 (17:51 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Mar 2018 17:51:45 +0000 (12:51 -0500)
During a device failover or partition migration reset, it is not
necessary to disable the backing adapter since it should not be
running yet and its Command-Response Queue is closed. Sending
device commands during this time could result in an error or
timeout disrupting the reset process. In these cases, just halt
transmissions, clean up resources, and continue with 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 d93f28658a2c3b7ebd7c64af3668c83cbd790164..7be4b06f69d2176f7946797973aafea69656ad60 100644 (file)
@@ -1653,12 +1653,15 @@ static int do_reset(struct ibmvnic_adapter *adapter,
                rc = ibmvnic_reenable_crq_queue(adapter);
                if (rc)
                        return 0;
+               ibmvnic_cleanup(netdev);
+       } else if (rwi->reset_reason == VNIC_RESET_FAILOVER) {
+               ibmvnic_cleanup(netdev);
+       } else {
+               rc = __ibmvnic_close(netdev);
+               if (rc)
+                       return rc;
        }
 
-       rc = __ibmvnic_close(netdev);
-       if (rc)
-               return rc;
-
        if (adapter->reset_reason == VNIC_RESET_CHANGE_PARAM ||
            adapter->wait_for_reset) {
                release_resources(adapter);