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

Fabio Estevam festevam at gmail.com
Fri Jan 8 03:09:22 CET 2016


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.

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?

Thanks


More information about the U-Boot mailing list