diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2018-04-27 14:54:01 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-29 19:50:11 -0500 |
commit | 3a0c57d0182911345aca784c19cce5095dbb0a09 (patch) | |
tree | 05f578818550f0b55b681a34a9f140e672a84f86 | |
parent | 0a6a2ff30c9ed47824af455207d1f268feb1ef63 (diff) | |
download | talos-skiboot-3a0c57d0182911345aca784c19cce5095dbb0a09.tar.gz talos-skiboot-3a0c57d0182911345aca784c19cce5095dbb0a09.zip |
core/pci-dt-slots: Fix devfn lookup
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@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | core/pci-dt-slot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pci-dt-slot.c b/core/pci-dt-slot.c index 4f5a0805..448a8f00 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, |