android_kernel_xiaomi_sm8350/drivers/pci
Hidetoshi Seto f158575696 PCI: pcie, aer: rework MASK macros in aerdrv_errprint.c
Definitions of MASK macros in aerdrv_errprint.c are tricky and unsafe.

For example, AER_AGENT_TRANSMITTER_MASK(_sev, _stat) does work like:
  static inline func(int _sev, int _stat)
  {
    if (_sev == AER_CORRECTABLE)
      return (_stat & (PCI_ERR_COR_REP_ROLL|PCI_ERR_COR_REP_TIMER));
    else
      return (_stat & PCI_ERR_COR_REP_ROLL);
  }
In case of else path here, for uncorrectable errors, testing bits in
_stat by PCI_ERR_COR_* does not make sense because _stat should have only
PCI_ERR_UNC_* bits originated in uncorrectable error status register.
But at this time this is safe because uncorrectable error using bit
position same to PCI_ERR_COR_REP_ROLL(= bit position 8) is not defined.
Likewise, AER_AGENT_COMPLETER_MASK is always PCI_ERR_UNC_COMP_ABORT but
it works because bit 15 of correctable error status is not defined.

It means that these MASK macros will turn to be wrong once if new error
is defined. (In fact, bit 15 of correctable is now defined in PCIe 2.1)

This patch changes these MASK macros to be more strict, not to return
PCI_ERR_COR_* bits for uncorrectable error status and vise versa.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-09 13:47:16 -07:00
..
hotplug PCI hotplug: add support for 5.0G link speed 2009-09-09 13:29:50 -07:00
pcie PCI: pcie, aer: rework MASK macros in aerdrv_errprint.c 2009-09-09 13:47:16 -07:00
.gitignore
access.c
bus.c
dmar.c
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c intel-iommu: Fix enabling snooping feature by mistake 2009-08-06 11:35:50 +01:00
intr_remapping.c Intel-IOMMU, intr-remap: source-id checking 2009-06-23 22:09:17 +01:00
intr_remapping.h Intel-IOMMU, intr-remap: source-id checking 2009-06-23 22:09:17 +01:00
iov.c PCI SR-IOV: correct broken resource alignment calculations 2009-08-30 08:37:25 -07:00
iova.c Fix iommu address space allocation 2009-07-01 11:19:29 -07:00
irq.c
Kconfig
legacy.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
Makefile PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
msi.c PCI MSI: Style cleanups 2009-09-09 13:29:35 -07:00
msi.h PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names 2009-06-29 12:15:19 -07:00
pci-acpi.c
pci-driver.c PCI: separate out pci_add_dynid() 2009-09-09 13:43:58 -07:00
pci-stub.c PCI: pci-stub: add pci_stub.ids parameter 2009-09-09 13:44:34 -07:00
pci-sysfs.c PCI: expose function reset capability in sysfs 2009-09-09 13:29:24 -07:00
pci.c PCI/GPU: implement VGA arbitration on Linux 2009-09-09 13:29:36 -07:00
pci.h PCI: expose function reset capability in sysfs 2009-09-09 13:29:24 -07:00
probe.c PCI: print out pref if mmio is prefetchable 2009-09-09 13:29:27 -07:00
proc.c
quirks.c PCI quirk: update 82576 device ids in SR-IOV quirks list 2009-09-09 13:29:43 -07:00
remove.c
rom.c
search.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
setup-bus.c PCI SR-IOV: correct broken resource alignment calculations 2009-08-30 08:37:25 -07:00
setup-irq.c
setup-res.c PCI: export pci_claim_resource for driver use 2009-09-09 13:29:20 -07:00
slot.c PCI: fix kernel-doc warnings 2009-06-29 12:13:56 -07:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00