public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] pcie_layerscape: Adjust the return value when ls_pcie_addr_valid() fails
Date: Wed, 6 Jan 2016 21:58:36 +0100	[thread overview]
Message-ID: <201601062158.37058.marex@denx.de> (raw)
In-Reply-To: <1452113598-32409-3-git-send-email-festevam@gmail.com>

On Wednesday, January 06, 2016 at 09:53:18 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> 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     0xabcd     Bridge device           0x04
> Cannot read bus configuration: -1
> 
> We can avoid this error by using the same approach as done in the
> linux kernel PCI designware driver: (drivers/pci/host/pcie-designware.c)
> 
> static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
> 			int size, u32 *val)
> {
> 	struct pcie_port *pp = bus->sysdata;
> 	int ret;
> 
> 	if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) {
> 		*val = 0xffffffff;
> 		return PCIBIOS_DEVICE_NOT_FOUND;
> 	}
> 
> ,where PCIBIOS_DEVICE_NOT_FOUND is returned when an invalid address
> is given.
> 
> Reported-by: Bin Meng <bmeng.cn@gmail.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Good stuff, thanks!

Acked-by: Marek Vasut <marex@denx.de>

I added Stefano on CC, so I added him. I'd like to see all three in mainline for 
this MW.

Best regards,
Marek Vasut

  reply	other threads:[~2016-01-06 20:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 20:53 [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel Fabio Estevam
2016-01-06 20:53 ` [U-Boot] [PATCH 2/3] pcie_imx: Adjust the return value when imx_pcie_addr_valid() fails Fabio Estevam
2016-01-06 20:57   ` Marek Vasut
2016-01-06 20:53 ` [U-Boot] [PATCH 3/3] pcie_layerscape: Adjust the return value when ls_pcie_addr_valid() fails Fabio Estevam
2016-01-06 20:58   ` Marek Vasut [this message]
2016-01-06 20:57 ` [U-Boot] [PATCH 1/3] pci: Add error values definitions from the kernel Marek Vasut
2016-01-06 22:55 ` Tom Rini
2016-01-06 22:58   ` Fabio Estevam
2016-01-06 23:10     ` Tom Rini
2016-01-07  2:11 ` Bin Meng
2016-01-07 12:15   ` Fabio Estevam
2016-01-07 12:58     ` Bin Meng
2016-01-07 13:31       ` Fabio Estevam
2016-01-07 16:28         ` Tom Rini
2016-01-07 16:49           ` Fabio Estevam
2016-01-08  0:02             ` Bin Meng
2016-01-08  0:15               ` Fabio Estevam
2016-01-08  0:31                 ` Bin Meng
2016-01-08  0:35                   ` Marek Vasut
2016-01-08  1:10                     ` Bin Meng
2016-01-08  0:46         ` Bin Meng
2016-01-08  0:48           ` Bin Meng
2016-01-08  2:09           ` Fabio Estevam
2016-01-08  2:18             ` Bin Meng
2016-01-08  2:20               ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201601062158.37058.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox