[U-Boot] [PATCH 3/6] dm: pci: Use complete bdf in all pci config read/write routines

Simon Glass sjg at chromium.org
Mon Jul 20 17:01:21 CEST 2015


On 19 July 2015 at 19:59, Simon Glass <sjg at chromium.org> wrote:
> On 18 July 2015 at 10:20, Bin Meng <bmeng.cn at gmail.com> wrote:
>> 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 at gmail.com>
>> ---
>>
>>  drivers/pci/pci-uclass.c | 46 +++++++++++++++++++++++-----------------------
>>  1 file changed, 23 insertions(+), 23 deletions(-)
>
> Acked-by: Simon Glass <sjg at chromium.org>
> Tested-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list