Page MenuHomeFreeBSD

D49388.diff
No OneTemporary

D49388.diff

Index: sys/compat/linuxkpi/common/include/linux/pci.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/pci.h
+++ sys/compat/linuxkpi/common/include/linux/pci.h
@@ -523,7 +523,18 @@
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` and has a devclass of `drmn`. We want to start the
+ * lookup from `vgapci`, so the parent of the passed `drmn`.
+ */
+ bridge = pdev->dev.bsddev;
+ if (device_get_devclass(bridge) == devclass_find("drmn"))
+ 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
Thu, Mar 20, 6:43 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17227542
Default Alt Text
D49388.diff (845 B)

Event Timeline