]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: pci: Use complete bdf in all pci config read/write routines
authorBin Meng <bmeng.cn@gmail.com>
Sat, 18 Jul 2015 16:20:04 +0000 (00:20 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:50:51 +0000 (13:50 +0200)
commit8d2c349ca743294618779cdec8c8b85c14d33d98
treed04b717fe1220efc040e884dca27e61a0649332a
parentcf4685927f73d80fb8db6eaf1a1af1328c56c343
dm: pci: Use complete bdf in all pci config read/write routines

Currently pci_bus_read_config() and pci_bus_write_config() are
called with bus number masked off in the parameter bdf, and bus
number is supposed to be added back in the bridge driver's pci
config read/write ops if the device is behind a pci bridge.
However this logic only works for a pci topology where there is
only one bridge off the root controller. If there is addtional
bridge in the system, the logic will create a non-existent bdf
where its bus number gets accumulated across bridges.

To correct this, we change all pci config read/write routines
to use complete bdf all the way up to the root controller.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-uclass.c