diff options
author | Amey Narkhede <ameynarkhede03@gmail.com> | 2021-08-17 23:34:52 +0530 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-08-17 15:21:35 -0500 |
commit | 69139244806537f9d51364f37fe146bb2ee88a05 (patch) | |
tree | 6f2589dfbded45253d70ceb92a45723a2b119982 /include/linux/pci.h | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) |
PCI: Cache PCIe Device Capabilities register
Add a new member called devcap in struct pci_dev for caching the PCIe
Device Capabilities register to avoid reading PCI_EXP_DEVCAP multiple
times.
Refactor pcie_has_flr() to use cached device capabilities.
Link: https://lore.kernel.org/r/20210817180500.1253-2-ameynarkhede03@gmail.com
Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 540b377ca8f6..1179c0ee2bfb 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -333,6 +333,7 @@ struct pci_dev { struct rcec_ea *rcec_ea; /* RCEC cached endpoint association */ struct pci_dev *rcec; /* Associated RCEC device */ #endif + u32 devcap; /* PCIe Device Capabilities */ u8 pcie_cap; /* PCIe capability offset */ u8 msi_cap; /* MSI capability offset */ u8 msix_cap; /* MSI-X capability offset */ |