Merge branch 'pci/aer'

- Clear only error bits in PCIe Device Status to avoid accidentally
  clearing Emergency Power Reduction Detected (Shuai Xue)

- Check for AER errors even in devices without drivers (Lukas Wunner)

* pci/aer:
  PCI/AER: Stop ruling out unbound devices as error source
  PCI/AER: Clear only error bits in PCIe Device Status
This commit is contained in:
Bjorn Helgaas 2026-04-13 12:50:01 -05:00
commit b3a631e43f
2 changed files with 3 additions and 6 deletions

View File

@ -2241,10 +2241,9 @@ EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
#ifdef CONFIG_PCIEAER
void pcie_clear_device_status(struct pci_dev *dev)
{
u16 sta;
pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta);
pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta);
pcie_capability_write_word(dev, PCI_EXP_DEVSTA,
PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED |
PCI_EXP_DEVSTA_FED | PCI_EXP_DEVSTA_URD);
}
#endif

View File

@ -1041,8 +1041,6 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
* 3) There are multiple errors and prior ID comparing fails;
* We check AER status registers to find possible reporter.
*/
if (atomic_read(&dev->enable_cnt) == 0)
return false;
/* Check if AER is enabled */
pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &reg16);