diff options
author | Thomas Falcon <tlfalcon@linux.ibm.com> | 2019-11-25 17:12:54 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-26 13:19:31 -0800 |
commit | 2147e3d09e9ba6edc54b1b4bb7d8fc3cca96776b (patch) | |
tree | 56077947153610000b9763482adc63d123aab472 /drivers/net/ethernet | |
parent | 070eca955c4af1248cb78a216463ff757a5dc511 (diff) | |
download | linux-2147e3d09e9ba6edc54b1b4bb7d8fc3cca96776b.tar.bz2 |
ibmvnic: Terminate waiting device threads after loss of service
If we receive a notification that the device has been deactivated
or removed, force a completion of all waiting threads.
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index e1ab2feeae53..dc1b88116330 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -4505,6 +4505,15 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq, case IBMVNIC_CRQ_XPORT_EVENT: netif_carrier_off(netdev); adapter->crq.active = false; + /* terminate any thread waiting for a response + * from the device + */ + if (!completion_done(&adapter->fw_done)) { + adapter->fw_done_rc = -EIO; + complete(&adapter->fw_done); + } + if (!completion_done(&adapter->stats_done)) + complete(&adapter->stats_done); if (test_bit(0, &adapter->resetting)) adapter->force_reset_recovery = true; if (gen_crq->cmd == IBMVNIC_PARTITION_MIGRATED) { |