git: d2210bd41a43 - stable/13 - linuxkpi: pci: Add more functions needed by drm
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Sep 2022 15:10:04 UTC
The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d2210bd41a432b4ad186d78ec799b1603a451d46 commit d2210bd41a432b4ad186d78ec799b1603a451d46 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2022-07-26 08:07:39 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2022-09-07 15:09:03 +0000 linuxkpi: pci: Add more functions needed by drm Mostly stubs to satisfy building Reviewed by: hselasky Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35938 (cherry picked from commit 6890e327a86da0c268f2b21637bce4891626ada0) --- sys/compat/linuxkpi/common/include/linux/pci.h | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c5aeabbf1791..1734fb52baa9 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1538,4 +1538,34 @@ linuxkpi_pcim_want_to_use_bus_functions(struct pci_dev *pdev) pdev->want_iomap_res = true; } +static inline bool +pci_is_thunderbolt_attached(struct pci_dev *pdev) +{ + + return (false); +} + +static inline void * +pci_platform_rom(struct pci_dev *pdev, size_t *size) +{ + + return (NULL); +} + +static inline void +pci_ignore_hotplug(struct pci_dev *pdev) +{ +} + +static inline int +pcie_get_readrq(struct pci_dev *dev) +{ + u16 ctl; + + if (pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &ctl)) + return (-EINVAL); + + return (128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12)); +} + #endif /* _LINUXKPI_LINUX_PCI_H_ */