Re: [PATCH iwl-next v2 2/2] idpf: implement pci error handlers

Tantilov, Emil S
2026-04-14T21:43:01Z

On 4/14/2026 8:10 AM, Lukas Wunner wrote:
> On Tue, Apr 14, 2026 at 11:09:05AM +0000, Loktionov, Aleksandr wrote:
>>> From: Tantilov, Emil S <emil.s.tantilov@intel.com>
>>> .slot_reset is the callback attempting to restore the device, provided
>>> a PCI reset was initiated by the AER driver.
>
> Just for clarity, those callbacks are invoked by PCI core error handling
> code and are shared by EEH, AER, DPC as well as s390 error recovery flows.
> So it's not only AER.

Understood. I can change the wording to be more generic.

>
>>> +/**
>>> + * idpf_pci_err_resume - Resume operations after PCI error recovery
>>> + * @pdev: PCI device struct
>>> + */
>>> +static void idpf_pci_err_resume(struct pci_dev *pdev) {
>>> + struct idpf_adapter *adapter = pci_get_drvdata(pdev);
>>> +
>>> + /* Force a PFR when resuming from PCI error. */
>>> + if (test_and_set_bit(IDPF_PCI_CB_RESET, adapter->flags))
>>> + adapter->dev_ops.reg_ops.trigger_reset(adapter,
>>> IDPF_HR_FUNC_RESET);
>>
>> You say "Force a PFR", but PFR is only triggered on the AER path,
>> not on the FLR path.
>
> And? idpf_pci_err_resume() is only invoked in the error recovery path
> (aka AER path), not FLR path AFAICS.

The driver calls is in idpf_pci_err_reset_done():

<...>-86378 [009] ..... 342752.746321: idpf_pci_err_reset_prepare
<-pci_dev_save_and_disable
bash-86378 [045] ..... 342756.748148: idpf_pci_err_reset_done
<-pci_reset_function
bash-86378 [045] ..... 342756.748272: idpf_pci_err_resume
<-pci_reset_function

Thanks,
Emil

>
> Thanks,
>
> Lukas