[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200918021246.22600-1-ljp@linux.ibm.com>
Date: Thu, 17 Sep 2020 21:12:46 -0500
From: Lijun Pan <ljp@...ux.ibm.com>
To: netdev@...r.kernel.org
Cc: sukadev@...ux.ibm.com, drt@...ux.ibm.com,
Lijun Pan <ljp@...ux.ibm.com>
Subject: [PATCH net-next] 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@...ux.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++
1 file changed, 6 insertions(+)
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) {
--
2.23.0
Powered by blists - more mailing lists