diff mbox

[2/3] platforms/astbmc/slots.c: Allow comparison of bus numbers when matching slots

Message ID 1498026669-2704-2-git-send-email-alistair@popple.id.au
State Accepted
Headers show

Commit Message

Alistair Popple June 21, 2017, 6:31 a.m. UTC
When matching devices on multiple down stream PLX busses we need to compare more
than just the device-id of the PCIe BDFN, so increase the mask to do so.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
 platforms/astbmc/slots.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platforms/astbmc/slots.c b/platforms/astbmc/slots.c
index 8be7426..a2bec87 100644
--- a/platforms/astbmc/slots.c
+++ b/platforms/astbmc/slots.c
@@ -77,7 +77,7 @@  static const struct slot_table_entry *match_slot_dev_entry(struct phb *phb,
 		if (ent->etype == st_npu_slot)
 			bdfn = pd->bdfn & 0xf8;
 		else
-			bdfn = pd->bdfn & 0xff;
+			bdfn = pd->bdfn & 0xffff;
 
 		if (ent->location == bdfn)
 			return ent;