[U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel

Bin Meng bmeng.cn at gmail.com
Fri Jan 8 03:18:22 CET 2016


Hi Fabio,

On Fri, Jan 8, 2016 at 10:09 AM, Fabio Estevam <festevam at gmail.com> wrote:
> Hi Bin,
>
> On Thu, Jan 7, 2016 at 10:46 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
>
>> The pci_hose_read_config_byte_via_dword() and
>> pci_hose_read_config_word_via_dword() only return -1 if the error
>> number < 0. What if I call:
>>
>> u32 data;
>> ret = pci_read_config_dword(dev, PCI_VENDOR_ID, &data);
>>
>> This will fail with error number 0x86, but if we do:
>>
>> u16 data;
>> ret = pci_read_config_dword(dev, PCI_VENDOR_ID, &data);
>>
>> This will _not_ fail. This is inconsistent. You are just trying to
>> workaround the 'pciinfo' command to make it output no error message.
>
> Yes, I can see this inconsistency here, thanks. It also happens before my patch.

Thanks for trying that on your side too.

>
> This inconsistency is gone if we do as you proposed earlier:
>
>     ret = imx_pcie_addr_valid(d);
>     if (ret) {
>         *val = 0xffffffff;
>         return 0;
>     }
>
> Do you still agree with it? If so, maybe you could send a patch for it?
>

Yep, agreed. I can send a patch if others don't object :)

Regards,
Bin


More information about the U-Boot mailing list