diff options
author | Yu Zhao <yu.zhao@intel.com> | 2008-10-19 20:35:20 +0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-20 11:01:52 -0700 |
commit | 270c66be9b4a6f2be53ef3aec5dc8e7b07782ec9 (patch) | |
tree | 241fa7549d1b4500325130e3f632b6ac7a19f0b3 /drivers/pci | |
parent | 0927678f55c9a50c296f7e6dae85e87b8236e155 (diff) | |
download | linux-stable-270c66be9b4a6f2be53ef3aec5dc8e7b07782ec9.tar.gz linux-stable-270c66be9b4a6f2be53ef3aec5dc8e7b07782ec9.tar.bz2 linux-stable-270c66be9b4a6f2be53ef3aec5dc8e7b07782ec9.zip |
PCI: fix AER capability check
The 'use pci_find_ext_capability everywhere' cleanup brought a new bug,
which makes the AER stop working. Fix it by actually using find_ext_cap
instead of just find_cap. Drop the unused config space size define while
we're at it.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 1ff21f6045d6..dfc63d01f20a 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -33,11 +33,11 @@ int pci_enable_pcie_error_reporting(struct pci_dev *dev) u16 reg16 = 0; int pos; - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); if (!pos) return -EIO; - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); if (!pos) return -EIO; diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index 3656e0349dd1..2529f3f2ea5a 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h @@ -25,7 +25,6 @@ #define PCIE_CAPABILITIES_REG 0x2 #define PCIE_SLOT_CAPABILITIES_REG 0x14 #define PCIE_PORT_DEVICE_MAXSERVICES 4 -#define PCI_CFG_SPACE_SIZE 256 #define get_descriptor_id(type, service) (((type - 4) << 4) | service) |