From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Fri, 8 Jan 2016 00:09:22 -0200 Subject: [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel In-Reply-To: References: <1452113598-32409-1-git-send-email-festevam@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Bin, On Thu, Jan 7, 2016 at 10:46 PM, Bin Meng 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