PCI/portdev: Disable AER for Titan Ridge 4C 2018
PATCH 1/1 PCI/portdev: Disable AER for Titan Ridge 4C 2018
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLP
(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/pcie/portdrv.c +3 -1
@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC ))) services |=PCIE_PORT_SERVICE_AER ;#endif
Signature · 1 line
2.43.0
Quoted 23 lines · Atharva Tiwari
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLP(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv.c +0
-0
drivers/pci/pcie/portdrv.c static int get_port_device_capability(struct pci_dev *dev) · line 245
Quoted 7 lines
drivers/pci/pcie/portdrv.c +3
-1@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC )))
You probably want to do this as a PCI quirk rather than adding a vendor specific line in a generic function. See drivers/pci/quirks.c.
DJ
Quoted 3 lines
drivers/pci/pcie/portdrv.c +0
-0services |=PCIE_PORT_SERVICE_AER ;#endif
Quoted 4 lines · Atharva Tiwari
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
Quoted 9 lines
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLP(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
Why not disable it in BIOS or use noaer command line option?
Quoted 20 lines
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv.c +3
-1@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC ))) services |=PCIE_PORT_SERVICE_AER ;#endif
Signature · 2 lines
Sathyanarayanan Kuppuswamy Linux Kernel Developer
Macs dosent allow normal users to change settings in the bios, and i want to use AER on different devices.
Quoted 12 lines · Kuppuswamy Sathyanarayanan
Quoted 9 lines · Atharva Tiwari
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLP
Quoted 6 lines
Quoted 4 lines
(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
Why not disable it in BIOS or use noaer command line option?
As per the bugzilla report, this looks like a regression. Did you bisect to find which commit introduced this warning?
Before disabling AER, please investigate the root cause:
Does this occur on all T2 iMacs or specific configurations? Have you tested different PCIe link speeds?
Is this a cable/connection issue or firmware problem?
The device range (0x15EA-0x15EC) needs justification. Which specific Titan Ridge variants have this issue?
Before fixing it, try to identify the root cause.
If it needs kernel fix, you need to use quirks (since BIOS change does not work for you).
Quoted 22 lines
Quoted 21 lines
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv.c +3
-1@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC ))) services |=PCIE_PORT_SERVICE_AER ;#endif
Signature · 2 lines
Sathyanarayanan Kuppuswamy Linux Kernel Developer
This is not a regression. By ‘happening since 6.1’, I meant that I have been using Linux on my iMac since kernel 6.1, and the warnings have been present for as long as I have been running Linux.
These warning occurs in all T2 iMac's. different link speeds dosent help. and this is most likely a firmware problem, as connection problems wouldnt occur on all T2 iMac's.
[+cc Thunderbolt folks]
Quoted 10 lines · Kuppuswamy Sathyanarayanan
Quoted 9 lines · Atharva Tiwari
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLP
Quoted 6 lines
Quoted 4 lines
(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
Why not disable it in BIOS or use noaer command line option?
If the kernel can figure this out by itself, we should do that so users don't have to debug issues and figure out how to disable in BIOS or use a command line option.
But if this is really a hardware issue, I would expect to see some reports on the web, and I can't find AER reports that mention these devices except this problem report.
Adding Thunderbolt folks in case they know about any errata.
Quoted 25 lines
Quoted 20 lines
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv.c +3
-1@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC ))) services |=PCIE_PORT_SERVICE_AER ;#endif Signature · 2 lines
Sathyanarayanan Kuppuswamy Linux Kernel Developer
Quoted 24 lines · Bjorn Helgaas
[+cc Thunderbolt folks]
Quoted 10 lines · Kuppuswamy Sathyanarayanan
Quoted 9 lines · Atharva Tiwari
Disable AER for Intel Titan Ridge 4C 2018 (used in T2 iMacs, where the warnings appear) that generates continuous pcieport warnings. such as:
pcieport 0000:00:1c.4: AER: Correctable error message received from 0000:07:00.0 pcieport 0000:07:00.0: PCIe Bus Error: severity=Correctable, type=Data Link Layer, (Receiver ID)
pcieport 0000:07:00.0: device [8086:15ea] error status/mask=00000080/00002000
pcieport 0000:07:00.0: [ 7] BadDLLPQuoted 6 lines
Quoted 4 lines
(see: https://bugzilla.kernel.org/show_bug.cgi?id=220651)
macOS also disables AER for Thunderbolt devices and controllers in their drivers.
Why not disable it in BIOS or use noaer command line option?
If the kernel can figure this out by itself, we should do that so users don't have to debug issues and figure out how to disable in BIOS or use a command line option.
Quoted 5 lines
But if this is really a hardware issue, I would expect to see some reports on the web, and I can't find AER reports that mention these devices except this problem report.
Adding Thunderbolt folks in case they know about any errata.
I wonder if these AER messages are caused by PTM too?
Can you try the latest mainline. It has this commit:
044b9f1a7f4f ("PCI/PTM: Enable only if device advertises relevant role")
and see if that changes anything?
Quoted 26 lines
Quoted 26 lines
Quoted 21 lines
Signed-off-by Atharva Tiwari <[email protected]>--- drivers/pci/pcie/portdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/pci/pcie/portdrv.c +3
-1@@ -240,7 +240,9 @@ static int get_port_device_capability(struct pci_dev *dev)if ((pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ||pci_pcie_type (dev) ==PCI_EXP_TYPE_RC_EC ) && dev->aer_cap &&pci_aer_available () && - (pcie_ports_native || host->native_aer)) + (pcie_ports_native || host->native_aer) && + !(dev->vendor ==PCI_VENDOR_ID_INTEL && + (dev->device >=0x15EA && dev->device <=0x15EC ))) services |=PCIE_PORT_SERVICE_AER ;#endif Signature · 2 lines
Sathyanarayanan Kuppuswamy Linux Kernel Developer
I’ve been using the mainline kernel (which I compiled about two weeks ago), and the problem still isn’t fixed, so PTM is most likely not the root cause.
Quoted 4 lines · Atharva Tiwari
I've been using the mainline kernel (which I compiled about two weeks ago), and the problem still isn't fixed, so PTM is most likely not the root cause.
The commit Mika called out went into v6.19-rc1, we're now at v6.19-rc4, so unless you're closely tracking Linus' tree, I'm afraid you may not have been using a recent enough kernel to verify Mika's suggestion.
Thanks,
Lukas
Quoted 4 lines · Atharva Tiwari
I’ve been using the mainline kernel (which I compiled about two weeks ago), and the problem still isn’t fixed, so PTM is most likely not the root cause.
Okay, what device you have connected there?
Can you provide full dmesg and output of 'sudo lspci -vv') when that device is connected?