Bug 215560

Summary: _PRS/_SRS methods should be optional
Product: Drivers Reporter: pierre.gondois
Component: PCIAssignee: drivers_pci (drivers_pci)
Status: NEW ---    
Severity: enhancement    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: v5.17-rc2 Subsystem:
Regression: No Bisected commit-id:

Description pierre.gondois 2022-02-02 10:20:44 UTC
The PCI legacy interrupts can be described with link devices, cf ACPI 6.4, s6.2.13 "_PRT (PCI Routing Table)".
Link devices can have optional _SRS/_PRS methods to set the interrupt.

In PCI Firmware Specification Revision 3.3, s4.3.2.1. "Resource Setting":
"""
A non-configurable device only specifies _CRS. However, if they are configurable, devices include
_PRS to indicate the possible resource setting and _SRS to allow OSPM to specify a new resource
allocation for the device.
"""

However, _PRS/_SRS methods are checked in drivers/acpi/pci_link.c, and the driver aborts if they are absent.
E.g.: When _PRS is missing:
ACPI: \_SB_.PCI0.LNKA: _CRS 36 not found in _PRS
ACPI: \_SB_.PCI0.LNKA: No IRQ available. Try pci=noacpi or acpi=off
Comment 1 pierre.gondois 2022-02-02 10:28:09 UTC
For reference, the initial check that the interrupt advertised in _CRS is also in _PRS should come from:
https://bugzilla.kernel.org/show_bug.cgi?id=2665
https://bugzilla.kernel.org/show_bug.cgi?id=2733