1 /* 2 * Copyright (C) 2021-2022 Intel Corporation. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __PCI_UTIL_H 9 #define __PCI_UTIL_H 10 11 #include <stdbool.h> 12 #include "pciaccess.h" 13 14 int pci_find_cap(struct pci_device *pdev, const int cap_id); 15 int pci_find_ext_cap(struct pci_device *pdev, int cap_id); 16 int pci_get_pcie_type(struct pci_device *dev); 17 bool is_root_port(struct pci_device *pdev); 18 bool is_mfdev(struct pci_device *pdev); 19 20 #endif 21