diff options
author | Lijun Pan <ljp@linux.ibm.com> | 2020-09-18 04:12:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-18 23:08:19 +0200 |
commit | 785a2b1036273f6b7f78740cc4b0f32ffc9846f5 (patch) | |
tree | 7fc49640118b3b6d34aecfa7dd81cc9ecc6168c0 | |
parent | Merge branch 'tipc-add-more-features-to-TIPC-encryption' (diff) | |
download | linux-785a2b1036273f6b7f78740cc4b0f32ffc9846f5.tar.xz linux-785a2b1036273f6b7f78740cc4b0f32ffc9846f5.zip |
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>
-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) { |