[Skiboot] [PATCH] core/pci-dt-slots: Fix devfn lookup
Oliver O'Halloran
oohall at gmail.com
Fri Apr 27 14:54:01 AEST 2018
We only want to use the device part of the bdfn when looking up the
switch down port. The required bit twiddling happens inside
find_devfn() and the masking here is broken since:
a) Keeps the fn part of the bdfn, and
b) Masks off part of the device number.
This breaks looking up the slot information in some cases.
Fixes: 6878b806682f ("pci-dt-slot: Big ol' cleanup")
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
core/pci-dt-slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/pci-dt-slot.c b/core/pci-dt-slot.c
index 4f5a0805e005..448a8f00cec5 100644
--- a/core/pci-dt-slot.c
+++ b/core/pci-dt-slot.c
@@ -152,7 +152,7 @@ static struct dt_node *find_node_for_dev(struct phb *phb,
return NULL;
/* find this down port */
- return find_devfn(sw_up, pd->bdfn & 0x1f);
+ return find_devfn(sw_up, pd->bdfn);
default:
PCIDBG(phb, pd->bdfn,
--
2.9.5
More information about the Skiboot
mailing list