diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/access.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 3af0478c057b..5278ac692cbf 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
@@ -472,7 +472,7 @@ EXPORT_SYMBOL_GPL(pci_cfg_access_unlock); | |||
472 | 472 | ||
473 | static inline int pcie_cap_version(const struct pci_dev *dev) | 473 | static inline int pcie_cap_version(const struct pci_dev *dev) |
474 | { | 474 | { |
475 | return dev->pcie_flags_reg & PCI_EXP_FLAGS_VERS; | 475 | return pcie_caps_reg(dev) & PCI_EXP_FLAGS_VERS; |
476 | } | 476 | } |
477 | 477 | ||
478 | static inline bool pcie_cap_has_devctl(const struct pci_dev *dev) | 478 | static inline bool pcie_cap_has_devctl(const struct pci_dev *dev) |
@@ -497,7 +497,7 @@ static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev) | |||
497 | return pcie_cap_version(dev) > 1 || | 497 | return pcie_cap_version(dev) > 1 || |
498 | type == PCI_EXP_TYPE_ROOT_PORT || | 498 | type == PCI_EXP_TYPE_ROOT_PORT || |
499 | (type == PCI_EXP_TYPE_DOWNSTREAM && | 499 | (type == PCI_EXP_TYPE_DOWNSTREAM && |
500 | dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT); | 500 | pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT); |
501 | } | 501 | } |
502 | 502 | ||
503 | static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev) | 503 | static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev) |
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index b42133afca98..31063ac30992 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -272,7 +272,7 @@ static int get_port_device_capability(struct pci_dev *dev) | |||
272 | 272 | ||
273 | /* Hot-Plug Capable */ | 273 | /* Hot-Plug Capable */ |
274 | if ((cap_mask & PCIE_PORT_SERVICE_HP) && | 274 | if ((cap_mask & PCIE_PORT_SERVICE_HP) && |
275 | dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT) { | 275 | pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT) { |
276 | pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ®32); | 276 | pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ®32); |
277 | if (reg32 & PCI_EXP_SLTCAP_HPC) { | 277 | if (reg32 & PCI_EXP_SLTCAP_HPC) { |
278 | services |= PCIE_PORT_SERVICE_HP; | 278 | services |= PCIE_PORT_SERVICE_HP; |