diff options
author | Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 2018-05-23 20:37:58 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-25 04:19:26 +0200 |
commit | 17c8705838a5acafbc77079c72378fc7e0f0a876 (patch) | |
tree | 90c0d75f31b982a154c1a03fdf737236e2ac86a3 | |
parent | ibmvnic: Check CRQ command return codes (diff) | |
download | linux-17c8705838a5acafbc77079c72378fc7e0f0a876.tar.xz linux-17c8705838a5acafbc77079c72378fc7e0f0a876.zip |
ibmvnic: Return error code if init interrupted by transport event
If device init is interrupted by a failover, set the init return
code so that it can be checked and handled appropriately by the
init routine.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 70835198a2f9..f1f744ebb14e 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -4249,7 +4249,10 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq, dev_info(dev, "Partner initialized\n"); adapter->from_passive_init = true; adapter->failover_pending = false; - complete(&adapter->init_done); + if (!completion_done(&adapter->init_done)) { + complete(&adapter->init_done); + adapter->init_done_rc = -EIO; + } ibmvnic_reset(adapter, VNIC_RESET_FAILOVER); break; case IBMVNIC_CRQ_INIT_COMPLETE: |