Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146073957
D53202.id164550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
799 B
Referenced Files
None
Subscribers
None
D53202.id164550.diff
View Options
diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c
--- a/sys/dev/thunderbolt/tb_pcib.c
+++ b/sys/dev/thunderbolt/tb_pcib.c
@@ -557,8 +557,20 @@
tb_pci_probe(device_t dev)
{
struct tb_pcib_ident *n;
+ device_t parent;
+ devclass_t dc;
- if ((n = tb_pcib_find_ident(device_get_parent(dev))) != NULL) {
+ /*
+ * This driver is only valid if the parent device is a PCI-PCI
+ * bridge. To determine that, check if the grandparent is a
+ * PCI bus.
+ */
+ parent = device_get_parent(dev);
+ dc = device_get_devclass(device_get_parent(parent));
+ if (strcmp(devclass_get_name(dc), "pci") != 0)
+ return (ENXIO);
+
+ if ((n = tb_pcib_find_ident(parent)) != NULL) {
switch (n->flags & TB_GEN_MASK) {
case TB_GEN_TB1:
device_set_desc(dev, "Thunderbolt 1 Link");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 28, 2:14 PM (3 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29071541
Default Alt Text
D53202.id164550.diff (799 B)
Attached To
Mode
D53202: tb_pci: Don't try to attach to PCI buses that aren't below a PCI-PCI brige
Attached
Detach File
Event Timeline
Log In to Comment