hdata/iohub: Use only wildcard slots for pluggables

Message ID 1512689298-9458-1-git-send-email-arbab@linux.vnet.ibm.com
State New
Headers show
Series
  • hdata/iohub: Use only wildcard slots for pluggables
Related show

Commit Message

Reza Arbab Dec. 7, 2017, 11:28 p.m.
From: Oliver O'Halloran <oohall@gmail.com>

We don't want to cause a VID:DID check against pluggable devices, as
they may use multiple devids.

Narrow the condition under which VID:DID is listed in the dt, so that
we'll end up creating a wildcard slot for these instead.

Cc: stable # 5.9.x
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
---
 hdata/iohub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hdata/iohub.c b/hdata/iohub.c
index a5f12fd..2260f60 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -705,7 +705,7 @@  static void parse_one_slot(const struct slot_map_entry *entry,
 			st_name(type), vid, did);
 
 		/* The VID:DID is only meaningful for builtins and switches */
-		if (vid && did) {
+		if (type == st_sw_upstream && vid && did) {
 			node = dt_new_2addr(parent, st_name(type), vid, did);
 			dt_add_property_cells(node, "reg", vid, did);
 		} else {