linux/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 PCI: Add pci_bus_set_ops 2009-06-16 14:29:33 -07:00
bus.c PCI AER: support Multiple Error Received and no error source id 2009-06-16 14:30:13 -07:00
dmar.c VT-d: add device IOTLB invalidation support 2009-05-18 14:45:13 +01:00
hotplug-pci.c
hotplug.c
htirq.c Merge branch 'x86/apic' into irq/numa 2009-05-12 12:17:36 +02:00
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 PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
Kconfig PCI: initialize and release SR-IOV capability 2009-03-20 10:48:22 -07:00
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 Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
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 PCI: define PCI resource names in an 'enum' 2009-01-07 11:13:01 -08:00
quirks.c PCI quirk: update 82576 device ids in SR-IOV quirks list 2009-09-09 13:29:43 -07:00
remove.c PCI: eliminate redundant pci_stop_dev() call from pci_destroy_dev() 2009-06-11 12:04:19 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
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