[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220225062358.1435652-5-sukadev@linux.ibm.com>
Date: Thu, 24 Feb 2022 22:23:54 -0800
From: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
To: netdev@...r.kernel.org
Cc: Brian King <brking@...ux.ibm.com>, Dany Madden <drt@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>
Subject: [PATCH net 4/8] ibmvnic: complete init_done on transport events
If we get a transport event, set the error and mark the init as
complete so the attempt to send crq-init or login fail sooner
rather than wait for the timeout.
Fixes: bbd669a868bb ("ibmvnic: Fix completion structure initialization")
Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index d8911a2a4370..d461d2bffef1 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5352,6 +5352,13 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,
adapter->fw_done_rc = -EIO;
complete(&adapter->fw_done);
}
+
+ /* if we got here during crq-init, retry crq-init */
+ if (!completion_done(&adapter->init_done)) {
+ adapter->init_done_rc = -EAGAIN;
+ complete(&adapter->init_done);
+ }
+
if (!completion_done(&adapter->stats_done))
complete(&adapter->stats_done);
if (test_bit(0, &adapter->resetting))
--
2.27.0
Powered by blists - more mailing lists