All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails
@ 2016-01-08  9:03 Bin Meng
  2016-01-08  9:03 ` [U-Boot] [PATCH 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails Bin Meng
  2016-01-09  3:35 ` [U-Boot] [U-Boot, 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Bin Meng @ 2016-01-08  9:03 UTC (permalink / raw)
  To: u-boot

When trying to access non-existent/unsupported PCI devices in
imx_pcie_read_config(), when imx_pcie_addr_valid() fails it returns
error code and fills in the result with 0xffffffff manually. But it
really should return zero to upper layer codes.

Reported-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
---

 drivers/pci/pcie_imx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index f1e189e..c14bb0a 100644
--- 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, pci_dev_t d,
 	ret = imx_pcie_addr_valid(d);
 	if (ret) {
 		*val = 0xffffffff;
-		return ret;
+		return 0;
 	}
 
 	va_address = get_bus_address(d, where);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails
  2016-01-08  9:03 [U-Boot] [PATCH 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Bin Meng
@ 2016-01-08  9:03 ` Bin Meng
  2016-01-09  3:35   ` [U-Boot] [U-Boot, " Tom Rini
  2016-01-09  3:35 ` [U-Boot] [U-Boot, 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Bin Meng @ 2016-01-08  9:03 UTC (permalink / raw)
  To: u-boot

When trying to access non-existent/unsupported PCI devices in
ls_pcie_read_config(), when ls_pcie_addr_valid() fails it returns
error code and fills in the result with 0xffffffff manually. But it
really should return zero to upper layer codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/pci/pcie_layerscape.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index 58e88ae..99f9c83 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -314,7 +314,7 @@ static int ls_pcie_read_config(struct pci_controller *hose, pci_dev_t d,
 
 	if (ls_pcie_addr_valid(hose, d)) {
 		*val = 0xffffffff;
-		return -EINVAL;
+		return 0;
 	}
 
 	if (PCI_BUS(d) == hose->first_busno) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails
  2016-01-08  9:03 [U-Boot] [PATCH 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Bin Meng
  2016-01-08  9:03 ` [U-Boot] [PATCH 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails Bin Meng
@ 2016-01-09  3:35 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-09  3:35 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 08, 2016 at 01:03:20AM -0800, Bin Meng wrote:

> When trying to access non-existent/unsupported PCI devices in
> imx_pcie_read_config(), when imx_pcie_addr_valid() fails it returns
> error code and fills in the result with 0xffffffff manually. But it
> really should return zero to upper layer codes.
> 
> Reported-by: Fabio Estevam <fabio.estevam@nxp.com>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160108/018cd27c/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails
  2016-01-08  9:03 ` [U-Boot] [PATCH 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails Bin Meng
@ 2016-01-09  3:35   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-09  3:35 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 08, 2016 at 01:03:21AM -0800, Bin Meng wrote:

> When trying to access non-existent/unsupported PCI devices in
> ls_pcie_read_config(), when ls_pcie_addr_valid() fails it returns
> error code and fills in the result with 0xffffffff manually. But it
> really should return zero to upper layer codes.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160108/4d12cab2/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-09  3:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08  9:03 [U-Boot] [PATCH 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Bin Meng
2016-01-08  9:03 ` [U-Boot] [PATCH 2/2] pci: layerscape: Adjust the return value when ls_pcie_addr_valid() fails Bin Meng
2016-01-09  3:35   ` [U-Boot] [U-Boot, " Tom Rini
2016-01-09  3:35 ` [U-Boot] [U-Boot, 1/2] pci: imx: Adjust the return value when imx_pcie_addr_valid() fails Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.