RE: [PATCH iwl-net 2/2] idpf: reset the function on shutdown
From: Loktionov, Aleksandr <hidden>
Date: 2026-09-18 15:46:45
Also in:
intel-wired-lan
quoted hunk ↗ jump to hunk
-----Original Message----- From: Tian Xun Ng <redacted> Sent: Thursday, September 17, 2026 12:52 PM To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org; Nguyen, Anthony L [off-list ref]; Kitszel, Przemyslaw [off-list ref]; Lobakin, Aleksander [off-list ref]; Tantilov, Emil S [off-list ref]; andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Tian Xun Ng [off-list ref] Subject: [PATCH iwl-net 2/2] idpf: reset the function on shutdown From: Tian Xun Ng <redacted> idpf_remove() ends with a function reset to leave the device clean for whoever binds it next. Commit 4c9106f4906a ("idpf: fix adapter NULL pointer dereference on reboot") replaced the idpf_remove() call in idpf_shutdown() with idpf_vc_core_deinit() and idpf_deinit_dflt_mbx(), and the reset was lost along the way. Restore it, so that the kernel started by a warm reboot or kexec finds the device in the same state as after a module unload. The reset alone does not stop the stray completion writes fixed by the previous patch: the next kernel's load-time reset already performs a reset and stale queue state was observed to survive it. It complements the previous patch, which makes the device tear its queues down first. Fixes: 4c9106f4906a ("idpf: fix adapter NULL pointer dereference on reboot") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Tian Xun Ng <redacted> --- drivers/net/ethernet/intel/idpf/idpf_main.c | 3 +++ 1 file changed, 3 insertions(+)diff --git a/drivers/net/ethernet/intel/idpf/idpf_main.cb/drivers/net/ethernet/intel/idpf/idpf_main.c index 129bccaa6..d7cd449fc 100644--- a/drivers/net/ethernet/intel/idpf/idpf_main.c +++ b/drivers/net/ethernet/intel/idpf/idpf_main.c@@ -197,6 +197,9 @@ static void idpf_shutdown(struct pci_dev *pdev) cancel_delayed_work_sync(&adapter->serv_task); cancel_delayed_work_sync(&adapter->vc_event_task); idpf_vc_core_deinit(adapter); + + /* Leave the device clean for the next kernel, as idpf_remove()does */ + adapter->dev_ops.reg_ops.trigger_reset(adapter, IDPF_HR_FUNC_RESET); idpf_deinit_dflt_mbx(adapter); if (system_state == SYSTEM_POWER_OFF) -- 2.50.1 (Apple Git-155)
Reviewed-by: Aleksandr Loktionov <redacted>