
Hi Simon,
On Wed, Oct 7, 2015 at 7:30 PM, Simon Glass sjg@chromium.org wrote:
This added error checking to pci_read_config_word(). It might be worth looking at why the access is failing.
I noticed that when VendorID !=0xffff then pci_read_config_word() returns 0.
In the case when VendorID ==0xffff then it returns -1.
If I do like this:
--- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -77,7 +77,7 @@ void pciinfo(int BusNum, int ShortPCIListing)
ret = pci_read_config_word(dev, PCI_VENDOR_ID, &VendorID); - if (ret) + if (ret && (VendorID != 0xFFFF)) goto error; if ((VendorID == 0xFFFF) || (VendorID == 0x0000)) continue;
Then the error message is not printed.
Not familiar with the PCI code, so any suggestions are welcome.
Thanks