OpenCloudOS-Kernel/drivers/pci/pcie
Alexandru Gagniuc c100beb9cc PCI/AER: Use only _OSC to determine AER ownership
Per the PCI Firmware spec, r3.2, sec 4.5.1, the OS can request control of
AER via bit 3 of the _OSC Control Field.  In the returned value of the
Control Field:

  The firmware sets [bit 3] to 1 to grant control over PCI Express Advanced
  Error Reporting.  ...  after control is transferred to the operating
  system, firmware must not modify the Advanced Error Reporting Capability.
  If control of this feature was requested and denied or was not requested,
  firmware returns this bit set to 0.

Previously the pci_root driver looked at the HEST FIRMWARE_FIRST bit to
determine whether to request ownership of the AER Capability.  This was
based on ACPI spec v6.3, sec 18.3.2.4, and similar sections, which say
things like:

  Bit [0] - FIRMWARE_FIRST: If set, indicates that system firmware will
            handle errors from this source first.

  Bit [1] - GLOBAL: If set, indicates that the settings contained in this
            structure apply globally to all PCI Express Devices.

These ACPI references don't say anything about ownership of the AER
Capability.

Remove use of the FIRMWARE_FIRST bit and rely only on the _OSC bit to
determine whether we have control of the AER Capability.

Link: https://lore.kernel.org/r/20181115231605.24352-1-mr.nuke.me@gmail.com/ v1
Link: https://lore.kernel.org/r/20190326172343.28946-1-mr.nuke.me@gmail.com/ v2
Link: https://lore.kernel.org/r/67af2931705bed9a588b5a39d369cb70b9942190.1587925636.git.sathyanarayanan.kuppuswamy@linux.intel.com
[bhelgaas: commit log, note: Alex posted this identical patch 18 months
ago, and I failed to apply it then, so I made him the author, added links
to his postings, and added his Signed-off-by]
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
2020-04-30 17:19:12 -05:00
..
Kconfig pci-v5.7-changes 2020-04-03 14:25:02 -07:00
Makefile PCI/DPC: Add Error Disconnect Recover (EDR) support 2020-03-28 13:19:04 -05:00
aer.c PCI/AER: Use only _OSC to determine AER ownership 2020-04-30 17:19:12 -05:00
aer_inject.c PCI/AER: Fix the broken interrupt injection 2020-03-08 11:07:12 +01:00
aspm.c PCI/ASPM: Reduce severity of common clock config message 2020-03-28 15:09:22 -05:00
bw_notification.c pci-v5.2-changes 2019-05-14 10:30:10 -07:00
dpc.c PCI/AER: Rationalize error status register clearing 2020-03-28 13:19:05 -05:00
edr.c PCI/EDR: Log only ACPI_NOTIFY_DISCONNECT_RECOVER events 2020-04-24 18:33:29 -05:00
err.c PCI/AER: Rationalize error status register clearing 2020-03-28 13:19:05 -05:00
pme.c PCI/PME: Replace dev_printk(KERN_DEBUG) with dev_info() 2019-05-09 16:27:29 -05:00
portdrv.h PCI/ERR: Remove service dependency in pcie_do_recovery() 2020-03-28 13:18:54 -05:00
portdrv_core.c PCI/ERR: Remove service dependency in pcie_do_recovery() 2020-03-28 13:18:54 -05:00
portdrv_pci.c PCI/DPC: Add "pcie_ports=dpc-native" to allow DPC without AER control 2019-10-25 15:11:43 -05:00
ptm.c PCI/PTM: Remove spurious "d" from granularity message 2019-11-21 07:52:32 -06:00