linuxkpi: Add pci_device_is_present()
This calls bus_child_present(9) internally. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38148
This commit is contained in:
parent
bbff0400c1
commit
49b6d5ed14
@ -1672,4 +1672,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_ */
|
||||
|
@ -996,6 +996,16 @@ lkpi_pci_msi_desc_alloc(int irq)
|
||||
return (desc);
|
||||
}
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user