aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/p2pdma.c
diff options
context:
space:
mode:
authorRajat Jain <rajatja@google.com>2020-07-07 15:46:02 -0700
committerBjorn Helgaas <bhelgaas@google.com>2020-07-10 13:49:35 -0500
commit52fbf5bdeeef415b28b8e6cdade1e48927927f60 (patch)
tree006acc3c262d5b64c7bffbb790ed40805e6bc1f4 /drivers/pci/p2pdma.c
parentPCI: Reorder pci_enable_acs() and dependencies (diff)
downloadlinux-dev-52fbf5bdeeef415b28b8e6cdade1e48927927f60.tar.xz
linux-dev-52fbf5bdeeef415b28b8e6cdade1e48927927f60.zip
PCI: Cache ACS capability offset in device
Currently the ACS capability is being looked up at a number of places. Read and store it once at enumeration so that it can be used by all later. No functional change intended. Link: https://lore.kernel.org/r/20200707224604.3737893-2-rajatja@google.com Signed-off-by: Rajat Jain <rajatja@google.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/p2pdma.c')
-rw-r--r--drivers/pci/p2pdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index e8e444eeb1cd..f29a48f8fa59 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -253,7 +253,7 @@ static int pci_bridge_has_acs_redir(struct pci_dev *pdev)
int pos;
u16 ctrl;
- pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ACS);
+ pos = pdev->acs_cap;
if (!pos)
return 0;