summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorLey Foon Tan <ley.foon.tan@intel.com>2019-05-24 05:29:59 +0300
committerTom Rini <trini@konsulko.com>2019-08-11 23:43:41 +0300
commitbf9b9813ad6c4727f733828a100267601cef52d2 (patch)
tree6395409f21691476b586486895152468549b6505 /drivers/pci
parentd0e52c6f29efa9b728ed6e7f705d4e92a8ff9d2d (diff)
downloadu-boot-bf9b9813ad6c4727f733828a100267601cef52d2.tar.xz
pci: intel: Fix error when enumerating multi-function PCIe device
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie_intel_fpga.c6
1 files 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) &&