Skip to contentSkip to conversation

iavf: Fix init and watchdog state machines

PATCH Superseded Mateusz Palczewski 2 participants 2 messages Apr 13, 2021 – Apr 14, 2021

Subsystems (2)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iavf: Fix init and watchdog state machines

From: Jan Sokolowski <[email protected]>

Use single state machine for driver initialization and for service initialized driver. The init state machine implemented in init_task() is merged into the watchdog_task(). The init_task() function is removed.

Testing-Hints: Change is only for VF driver state machine,
should be checked load/unload/reset and set/get driver parameters.

Fixes bac8486116b0 ("iavf: Refactor the watchdog state machine")

---
v2: splitted the patch into smaller pieces

---
 drivers/net/ethernet/intel/iavf/iavf.h      |   2 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c | 159 ++++++++++----------
 2 files changed, 77 insertions(+), 84 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +1 -1
index 874da98..3c18efc 100644
@@ -175,6 +175,7 @@ enum iavf_state_t {
 	__IAVF_INIT_VERSION_CHECK,	/* aq msg sent, awaiting reply */
 	__IAVF_INIT_GET_RESOURCES,	/* aq msg sent, awaiting reply */
 	__IAVF_INIT_SW,		/* got resources, setting up structs */
+	__IAVF_INIT_FAILED,	/* init failed, restarting procedure */
 	__IAVF_RESETTING,		/* in reset */
 	__IAVF_COMM_FAILED,		/* communication with PF failed */
 	/* Below here, watchdog is running */
@@ -230,7 +231,6 @@ struct iavf_adapter {
 	struct work_struct reset_task;
 	struct work_struct adminq_task;
 	struct delayed_work client_task;
-	struct delayed_work init_task;
 	wait_queue_head_t down_waitqueue;
 	struct iavf_q_vector *q_vectors;
 	struct list_head vlan_filter_list;
drivers/net/ethernet/intel/iavf/iavf_main.c +76 -83

297 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 iavf: Fix init and watchdog state machines

Quoted 7 lines · Mateusz Palczewski

From: Jan Sokolowski <[email protected]>

Use single state machine for driver initialization and for service initialized driver. The init state machine implemented in init_task() is merged into the watchdog_task(). The init_task() function is removed.

It's unclear to me what's being fixed here. This sounds like a refactor. If so, it should go to -next.

Also, feedback from the previous version has not been addressed. There is a new state and helper function, but no explanation of it here.

Quoted 14 lines

Testing-Hints: Change is only for VF driver state machine,
should be checked load/unload/reset and set/get driver parameters.

Fixes bac8486116b0 ("iavf: Refactor the watchdog state machine")

---
v2: splitted the patch into smaller pieces

---
 drivers/net/ethernet/intel/iavf/iavf.h      |   2 +-
 drivers/net/ethernet/intel/iavf/iavf_main.c | 159 ++++++++++------
----
 2 files changed, 77 insertions(+), 84 deletions(-)