Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112521074
D49388.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
845 B
Referenced Files
None
Subscribers
None
D49388.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D49388: linuxkpi: Fix `pci_upstream_bridge()` with DRM devices
Attached
Detach File
Event Timeline
Log In to Comment