diff options
author | John Allen <jallen@linux.vnet.ibm.com> | 2017-05-26 10:30:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-26 15:32:44 -0400 |
commit | 017892c1ec15d4efcb30edf9fb56a64c889540c3 (patch) | |
tree | c94bf4605f053565a530ed17938e32b4b66b6876 /drivers/net/ethernet/ibm | |
parent | d944c3d60ac9ec6968d97ac5704155d0afac5216 (diff) | |
download | blackbird-op-linux-017892c1ec15d4efcb30edf9fb56a64c889540c3.tar.gz blackbird-op-linux-017892c1ec15d4efcb30edf9fb56a64c889540c3.zip |
ibmvnic: Handle failover after failed init crq
Handle case where phyp sends a failover after failing to send the
init crq.
Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 4997de425b5c..1f7cf6fbe150 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -3167,6 +3167,8 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq, switch (gen_crq->cmd) { case IBMVNIC_CRQ_INIT: dev_info(dev, "Partner initialized\n"); + adapter->from_passive_init = true; + complete(&adapter->init_done); break; case IBMVNIC_CRQ_INIT_COMPLETE: dev_info(dev, "Partner initialization complete\n"); @@ -3481,11 +3483,18 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter) return rc; } + adapter->from_passive_init = false; + init_completion(&adapter->init_done); ibmvnic_send_crq_init(adapter); if (!wait_for_completion_timeout(&adapter->init_done, timeout)) { dev_err(dev, "Initialization sequence timed out\n"); - release_crq_queue(adapter); + return -1; + } + + if (adapter->from_passive_init) { + adapter->state = VNIC_OPEN; + adapter->from_passive_init = false; return -1; } diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h index 4816e0425025..fa6ac4e4a16e 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.h +++ b/drivers/net/ethernet/ibm/ibmvnic.h @@ -1031,5 +1031,5 @@ struct ibmvnic_adapter { struct list_head rwi_list; struct work_struct ibmvnic_reset; bool resetting; - bool napi_enabled; + bool napi_enabled, from_passive_init; }; |