diff options
author | Lijun Pan <ljp@linux.ibm.com> | 2020-09-18 05:12:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-19 00:08:19 +0300 |
commit | 785a2b1036273f6b7f78740cc4b0f32ffc9846f5 (patch) | |
tree | 7fc49640118b3b6d34aecfa7dd81cc9ecc6168c0 /drivers | |
parent | 5d7d28e5fff9668ee8ea6a5f1459276330767aa9 (diff) | |
download | linux-785a2b1036273f6b7f78740cc4b0f32ffc9846f5.tar.xz |
Revert "ibmvnic: remove never executed if statement"
This reverts commit 550f4d46aff6fe57c9b1c6719c3c9de2237d7ac2.
adapter->from_passive_init may be changed in ibmvnic_handle_crq
while ibmvnic_reset_init is waiting for the completion of
adapter->init_done.
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index e2a3c4bf00c9..6d320be47e60 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -5047,6 +5047,12 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter, bool reset) return adapter->init_done_rc; } + if (adapter->from_passive_init) { + adapter->state = VNIC_OPEN; + adapter->from_passive_init = false; + return -1; + } + if (reset && test_bit(0, &adapter->resetting) && !adapter->wait_for_reset && adapter->reset_reason != VNIC_RESET_MOBILITY) { |