Page MenuHomeFreeBSD

D49388.1786300887.diff
No OneTemporary

Size
854 B
Referenced Files
None
Subscribers
None

D49388.1786300887.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -523,7 +523,20 @@
if (pdev == pdev->bus->self) {
device_t bridge;
- bridge = device_get_parent(pdev->dev.bsddev);
+ /*
+ * In the case of DRM drivers, the passed device is a child of
+ * `vgapci`. We want to start the lookup from `vgapci`, so the
+ * parent of the passed `drmn`.
+ *
+ * We can use the `isdrm` flag to determine this.
+ */
+ bridge = pdev->dev.bsddev;
+ if (pdev->pdrv != NULL && pdev->pdrv->isdrm)
+ bridge = device_get_parent(bridge);
+ if (bridge == NULL)
+ goto done;
+
+ bridge = device_get_parent(bridge);
if (bridge == NULL)
goto done;
bridge = device_get_parent(bridge);

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 9, 6:41 PM (9 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29380001
Default Alt Text
D49388.1786300887.diff (854 B)

Event Timeline