Re: [Intel-wired-lan] [PATCH iwl-next v3 2/2] idpf: implement pci error handlers
"Salin, Samuel" <[email protected]> Thu, 16 Jul 2026 16:12:20 +0000
| Newsgroups | org.osuosl.intel-wired-lan,org.kernel.vger.linux-pci,org.kernel.vger.netdev |
|---|---|
| Message-ID | <SJ1PR11MB62970F5BDCF78402EA8EDF9D9BC72@SJ1PR11MB6297.namprd11.prod.outlook.com> |
> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Emil Tantilov > Sent: Tuesday, June 30, 2026 4:19 PM > To: [email protected] > Cc: [email protected]; Kitszel, Przemyslaw > <[email protected]>; Bhat, Jay <[email protected]>; Barrera, > Ivan D <[email protected]>; Loktionov, Aleksandr > <[email protected]>; Zaremba, Larysa > <[email protected]>; Nguyen, Anthony L > <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; Lobakin, Aleksander <[email protected]>; > [email protected]; Chittim, Madhu <[email protected]>; > [email protected]; [email protected]; [email protected]; > [email protected] > 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 <[email protected]> > Signed-off-by: Alan Brady <[email protected]> > Signed-off-by: Emil Tantilov <[email protected]> > Reviewed-by: Jay Bhat <[email protected]> > Reviewed-by: Madhu Chittim <[email protected]> > Reviewed-by: Aleksandr Loktionov <[email protected]> > --- > 2.37.3 Tested-by: Samuel Salin <[email protected]>