diff options
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h | 9 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_pci.c | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 8d41e33b0da8..ad7589e692f2 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1664,4 +1664,13 @@ pci_is_enabled(struct pci_dev *pdev) PCIM_CMD_BUSMASTEREN) != 0); } +static inline int +pci_wait_for_pending_transaction(struct pci_dev *pdev) +{ + + return (0); +} + +bool pci_device_is_present(struct pci_dev *pdev); + #endif /* _LINUXKPI_LINUX_PCI_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 54780adfda14..e4f85b906563 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -962,6 +962,16 @@ out: return (-EINVAL); } +bool +pci_device_is_present(struct pci_dev *pdev) +{ + device_t dev; + + dev = pdev->dev.bsddev; + + return (bus_child_present(dev)); +} + CTASSERT(sizeof(dma_addr_t) <= sizeof(uint64_t)); struct linux_dma_obj { |