On 29 July 2018 at 07:37, Bin Meng <[email protected]> wrote: > With the newly added test cases for PCI configuration access, we get: > > => ut dm pci_busdev > Test: dm_test_pci_busdev: pci.c > test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: > Expected 4660, got 65535 > Test: dm_test_pci_busdev: pci.c (flat tree) > test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: > Expected 4660, got 65535 > Failures: 2 > > The bug only shows up when bus number is not equal to zero. This is > caused by the plain find_devfn parameter is passed to function call > pci_bus_find_devfn(), inside which find_devfn is compared to devfn > in the device's pplat structure. However pplat->devfn does not carry > the bus number. Fix this by passing find_devfn with bus number masked. > > Signed-off-by: Bin Meng <[email protected]> > --- > > Changes in v2: None > > drivers/pci/pci-emul-uclass.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <[email protected]> Nice to find this. _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

