[Intel-wired-lan] [PATCH iwl-next v3 2/2] idpf: implement pci error handlers
Salin, Samuel
samuel.salin at intel.com
Thu Jul 16 16:12:20 UTC 2026
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Emil Tantilov
> Sent: Tuesday, June 30, 2026 4:19 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>; Bhat, Jay <jay.bhat at intel.com>; Barrera,
> Ivan D <ivan.d.barrera at intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov at intel.com>; Zaremba, Larysa
> <larysa.zaremba at intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; andrew+netdev at lunn.ch;
> davem at davemloft.net; edumazet at google.com; kuba at kernel.org;
> pabeni at redhat.com; Lobakin, Aleksander <aleksander.lobakin at intel.com>;
> linux-pci at vger.kernel.org; Chittim, Madhu <madhu.chittim at intel.com>;
> decot at google.com; willemb at google.com; sheenamo at google.com;
> lukas at wunner.de
> Subject: [Intel-wired-lan] [PATCH iwl-next v3 2/2] idpf: implement pci error
> handlers
>
> Add callbacks to handle PCI errors and FLR reset. When preparing to handle
> reset on the bus, the driver must stop all operations that can lead to MMIO
> access in order to prevent HW errors. To accomplish this, introduce helper
> idpf_reset_prepare() that gets called prior to FLR or when PCI error is
> detected. Upon resume the recovery is done through the existing reset path
> by starting the event task.
>
> The following callbacks are implemented:
> .reset_prepare runs the first portion of the generic reset path leading up to the
> part where we wait for the reset to complete.
> .reset_done/resume runs the recovery part of the reset handling.
> .error_detected is the callback dealing with PCI errors, similar to the prepare
> call, we stop all operations, prior to attempting a recovery.
> .slot_reset is the callback attempting to restore the device, provided a PCI reset
> was initiated due to an error on the bus.
>
> Whereas previously the init logic guaranteed netdevs during reset, the
> addition of idpf_detach_and_close() to the PCI callbacks flow makes it possible
> for the function to be called without netdevs. Add check to avoid NULL pointer
> dereference in that case.
>
> Co-developed-by: Alan Brady <alan.brady at intel.com>
> Signed-off-by: Alan Brady <alan.brady at intel.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov at intel.com>
> Reviewed-by: Jay Bhat <jay.bhat at intel.com>
> Reviewed-by: Madhu Chittim <madhu.chittim at intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> ---
> 2.37.3
Tested-by: Samuel Salin <Samuel.salin at intel.com>
More information about the Intel-wired-lan
mailing list