diff options
author | Rajat Jain <rajatja@google.com> | 2020-07-08 01:46:02 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-07-10 21:49:35 +0300 |
commit | 52fbf5bdeeef415b28b8e6cdade1e48927927f60 (patch) | |
tree | 006acc3c262d5b64c7bffbb790ed40805e6bc1f4 /drivers/pci/p2pdma.c | |
parent | cbe420361f92a31694fb3773a6247fda9aba1db3 (diff) | |
download | linux-52fbf5bdeeef415b28b8e6cdade1e48927927f60.tar.xz |
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.c | 2 |
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; |