Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2016-01-06 Thread Fabio Estevam
On Tue, Jan 5, 2016 at 9:58 PM, Fabio Estevam wrote: > Hi Bin, > > On Thu, Dec 31, 2015 at 1:20 PM, Fabio Estevam wrote: > >> Do you mean like this for imx? >> >> --- a/drivers/pci/pcie_imx.c >> +++ b/drivers/pci/pcie_imx.c >> @@ -381,7 +381,7 @@ static int imx_pcie_read_config(struct pci_control

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2016-01-05 Thread Fabio Estevam
Hi Bin, On Thu, Dec 31, 2015 at 1:20 PM, Fabio Estevam wrote: > Do you mean like this for imx? > > --- a/drivers/pci/pcie_imx.c > +++ b/drivers/pci/pcie_imx.c > @@ -381,7 +381,7 @@ static int imx_pcie_read_config(struct pci_controller > *hose, > ret = imx_pcie_addr_valid(d); > i

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2016-01-04 Thread Fabio Estevam
On Mon, Jan 4, 2016 at 2:22 PM, Tom Rini wrote: > Something to consolidate for the next release it sounds like. However Agreed. > we need this fixed this release yes? Can I get a v2 of this patch with > a proper commit message? Thanks! Yes, will send it today. __

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2016-01-04 Thread Tom Rini
On Mon, Jan 04, 2016 at 11:11:18AM +0800, Bin Meng wrote: > Hi Fabio, > > On Thu, Dec 31, 2015 at 11:20 PM, Fabio Estevam wrote: > > Hi Bin, > > > > On Thu, Dec 31, 2015 at 7:32 AM, Bin Meng wrote: > > > >> I also see this behavior on ls1021atwr board. I agree with Simon, the > >> correct fix sh

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2016-01-03 Thread Bin Meng
Hi Fabio, On Thu, Dec 31, 2015 at 11:20 PM, Fabio Estevam wrote: > Hi Bin, > > On Thu, Dec 31, 2015 at 7:32 AM, Bin Meng wrote: > >> I also see this behavior on ls1021atwr board. I agree with Simon, the >> correct fix should fix the PCIe driver to return 0 instead of -EINVAL. > > Do you mean lik

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-12-31 Thread Fabio Estevam
Hi Bin, On Thu, Dec 31, 2015 at 7:32 AM, Bin Meng wrote: > I also see this behavior on ls1021atwr board. I agree with Simon, the > correct fix should fix the PCIe driver to return 0 instead of -EINVAL. Do you mean like this for imx? --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-12-31 Thread Bin Meng
+Alison, York, Hi, On Fri, Oct 9, 2015 at 9:44 PM, Simon Glass wrote: > Hi Fabio, > > On 9 October 2015 at 14:36, Fabio Estevam wrote: >> On Fri, Oct 9, 2015 at 10:31 AM, Simon Glass wrote: >> >>> If you look down one more level, these end up calling >>> imx_pcie_read_config() which calls imx_

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Simon Glass
Hi Fabio, On 9 October 2015 at 14:36, Fabio Estevam wrote: > On Fri, Oct 9, 2015 at 10:31 AM, Simon Glass wrote: > >> If you look down one more level, these end up calling >> imx_pcie_read_config() which calls imx_pcie_addr_valid(): >> >> static int imx_pcie_addr_valid(pci_dev_t d) >> { >>if

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Fabio Estevam
On Fri, Oct 9, 2015 at 10:31 AM, Simon Glass wrote: > If you look down one more level, these end up calling > imx_pcie_read_config() which calls imx_pcie_addr_valid(): > > static int imx_pcie_addr_valid(pci_dev_t d) > { >if ((PCI_BUS(d) == 0) && (PCI_DEV(d) > 1)) > return -EINVAL; >

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Simon Glass
Hi Fabio, On 9 October 2015 at 14:22, Fabio Estevam wrote: > Hi Simon, > > On Fri, Oct 9, 2015 at 10:01 AM, Simon Glass wrote: > >> I'm just surprised that it is failing when there is nothing there. I >> think it should succeed (and read 0x). >> >> What board is this? Can you find the code t

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Fabio Estevam
Hi Simon, On Fri, Oct 9, 2015 at 10:01 AM, Simon Glass wrote: > I'm just surprised that it is failing when there is nothing there. I > think it should succeed (and read 0x). > > What board is this? Can you find the code that is returning this > error? It may be a call to pci_set_ops() which

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Simon Glass
Hi Fabio, On 9 October 2015 at 13:52, Fabio Estevam wrote: > On Fri, Oct 9, 2015 at 6:36 AM, Simon Glass wrote: > >> This seems really odd to me. Why would pci_read_config_word() return >> an error if there is no device there? Is that the real bug here? > > Looks like the expected behaviour: It

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Fabio Estevam
On Fri, Oct 9, 2015 at 6:36 AM, Simon Glass wrote: > This seems really odd to me. Why would pci_read_config_word() return > an error if there is no device there? Is that the real bug here? Looks like the expected behaviour: It tried to scan all the PCI elements in the bus and it failed to read w

Re: [U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-09 Thread Simon Glass
Hi Fabio, On 8 October 2015 at 00:37, Fabio Estevam wrote: > From: Fabio Estevam > > Since commit ff3e077bd2 ("dm: pci: Add a uclass for PCI") the following > error message is seen: > > => pci 0 > Scanning PCI devices on bus 0 > BusDevFun VendorId DeviceId Device Class Sub-Class > ___

[U-Boot] [PATCH] cmd_pci: Check for VendorID earlier

2015-10-07 Thread Fabio Estevam
From: Fabio Estevam Since commit ff3e077bd2 ("dm: pci: Add a uclass for PCI") the following error message is seen: => pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _ 00.01.00 0x16c3