On 12/3/26 12:22, Mario Limonciello wrote:
> 
> 
> On 12/3/26 13:01, Kuppuswamy Sathyanarayanan wrote:
>> Hi,
>>
>> On 12/3/26 10:49, Mario Limonciello wrote:
>>> PCIe r7.0, sec 6.2.11, "Implementation Note: Determination of DPC Control",
>>> recommends that operating systems link control of DPC to control of AER.
>>> Accordingly, since commit eed85ff4c0da ("PCI/DPC: Enable DPC only if AER
>>> is available"), the DPC driver only binds to a Port if the OS controls AER
>>> or the user specified "pcie_ports=dpc-native".
>>>
>>> At the time, Linux did not negotiate DPC control with the platform at all.
>>> Commit ac1c8e35a326 ("PCI/DPC: Add Error Disconnect Recover (EDR)
>>> support") added a request for DPC control via _OSC, independent of AER
>>> control, and recorded the result in host->native_dpc.  But it didn't
>>> update portdrv or the DPC driver to use host->native_dpc, so if the
>>> platform grants DPC control while retaining AER control, we own DPC but
>>> never use it.  Nobody enables DPC, and errors below the Port are not
>>> contained.
>>>
>>> Some platforms grant DPC control without AER control and have no HEST or
>>> other firmware-first error handling, e.g.:
>>>
>>>    acpi PNP0A08:00: _OSC: platform does not support [SHPCHotplug AER]
>>>    acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME PCIeCapability 
>>> LTR DPC]
>>>    acpi PNP0A08:00: OS native features: SHPCHotplug- PCIeHotplug+ PME+ AER- 
>>> DPC+ LTR+
>>>
>>> Treat a platform grant of DPC control like "pcie_ports=dpc-native" and use
>>> DPC if host->native_dpc is set, even if the OS doesn't control AER.
>>
>>
>> pci/next already does this with two commits from this series:
>>
>>    
>> https://lore.kernel.org/r/20261118181718.3907441-1-sathyanarayanan.kuppusw...@linux.intel.com/
>>
>>    db6bf75c52c3 ("PCI/DPC: Reinstate support for AER-incapable ports")
>>    removes the pcie_aer_is_native() check from dpc_probe().
>>
>>    b7e91bf93854 ("PCI/portdrv: Bind DPC service based on
>>    host_bridge->native_dpc") binds the DPC service based only on
>>    host->native_dpc. "pcie_ports=native" and "pcie_ports=dpc-native"
>>    are already folded into the _OSC mask, so they are reflected in
>>    native_dpc.
>>
>> So on pci/next, a platform that reports "AER- DPC+" should already get
>> the DPC service.
>>
>> Can you test your use case it with pci/next kernel?
>>
> It sure does work, thanks!
> 
> [    1.599468] acpi PNP0A08:00: _OSC: platform does not support [SHPCHotplug 
> AER]
> [    1.600933] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME 
> PCIeCapability LTR DPC]
> [    1.605760] acpi PNP0A08:00: OS native features: SHPCHotplug- PCIeHotplug+ 
> PME+ AER- DPC+ LTR+
> [    2.315295] pcieport 0000:00:01.1: DPC: enabled with IRQ 35
> [    2.315297] pcieport 0000:00:01.1: DPC: error containment capabilities: 
> Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 6, DL_ActiveErr+
> [    2.317497] pcieport 0000:00:01.2: DPC: enabled with IRQ 36
> [    2.317499] pcieport 0000:00:01.2: DPC: error containment capabilities: 
> Int Msg #0, RPExt+ PoisonedTLP+ SwTrigger+ RP PIO Log 6, DL_ActiveErr+

Great! Thanks for checking.

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


Reply via email to