From: Ley Foon Tan <ley.foon.tan@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] pci: intel: Fix error when enumerating multi-function PCIe device
Date: Fri, 24 May 2019 10:29:59 +0800 [thread overview]
Message-ID: <1558665000-3037-3-git-send-email-ley.foon.tan@intel.com> (raw)
In-Reply-To: <1558665000-3037-1-git-send-email-ley.foon.tan@intel.com>
Hardware return completion status non-zero when read from non exist
function in multi-function PCIe device. Return error will cause PCIe
enumeration fail.
Change it to return 0 and return value 0xffffffff when error.
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
---
drivers/pci/pcie_intel_fpga.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index e74b35ac16..a096d1c697 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -161,8 +161,10 @@ static int tlp_read_packet(struct intel_fpga_pcie *pcie, u32 *value)
dw[count++] = cra_readl(pcie, RP_RXCPL_REG);
if (ctrl & RP_RXCPL_EOP) {
comp_status = TLP_COMP_STATUS(dw[1]);
- if (comp_status)
- return -EFAULT;
+ if (comp_status) {
+ *value = pci_get_ff(PCI_SIZE_32);
+ return 0;
+ }
if (value &&
TLP_BYTE_COUNT(dw[1]) == sizeof(u32) &&
--
2.19.0
next prev parent reply other threads:[~2019-05-24 2:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 2:29 [U-Boot] [PATCH 0/3] Intel FPGA PCIe fixes Ley Foon Tan
2019-05-24 2:29 ` [U-Boot] [PATCH 1/3] pci: intel: Increase TLP polling counter Ley Foon Tan
2019-08-13 16:52 ` Tom Rini
2019-05-24 2:29 ` Ley Foon Tan [this message]
2019-08-13 16:52 ` [U-Boot] [PATCH 2/3] pci: intel: Fix error when enumerating multi-function PCIe device Tom Rini
2019-05-24 2:30 ` [U-Boot] [PATCH 3/3] pci: intel: Fix configuration type based on secondary number Ley Foon Tan
2019-08-13 16:52 ` Tom Rini
2019-06-11 0:30 ` [U-Boot] [PATCH 0/3] Intel FPGA PCIe fixes Ley Foon Tan
2019-08-09 9:04 ` Ley Foon Tan
2019-08-09 15:30 ` Tom Rini
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=1558665000-3037-3-git-send-email-ley.foon.tan@intel.com \
--to=ley.foon.tan@intel.com \
--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