summaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pcie-iproc.h
diff options
context:
space:
mode:
authorRay Jui <ray.jui@broadcom.com>2016-10-31 17:38:33 -0700
committerBjorn Helgaas <bhelgaas@google.com>2016-11-14 16:07:37 -0600
commit538928fd6ce8e0342d98a203a1d16caf2ce33f2b (patch)
tree48746af68701a77695bf3deed88707565fdf477b /drivers/pci/host/pcie-iproc.h
parent404349c5c806d56de2b41f48a99402c3c7573af5 (diff)
downloadlinux-538928fd6ce8e0342d98a203a1d16caf2ce33f2b.tar.bz2
PCI: iproc: Fix exception with multi-function devices
During enumeration with multi-function EP devices, access to the configuration space of a non-existent function results in an unsupported request being returned as expected. By default the PAXB-based iProc PCIe controller forwards this as an APB error to the host system and that causes an exception, which is undesired. Disable this undesired behaviour and let the kernel PCI stack deal with an access to the non-existent function, in which case a vendor ID of 0xffff is returned and handled gracefully. Reported-by: JD Zheng <jiandong.zheng@broadcom.com> Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: JD Zheng <jiandong.zheng@broadcom.com> Reviewed-by: Oza Oza <oza.oza@broadcom.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc.h')
-rw-r--r--drivers/pci/host/pcie-iproc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h
index 768be05cf496..711dd3a5f55b 100644
--- a/drivers/pci/host/pcie-iproc.h
+++ b/drivers/pci/host/pcie-iproc.h
@@ -57,6 +57,8 @@ struct iproc_msi;
* @phy: optional PHY device that controls the Serdes
* @map_irq: function callback to map interrupts
* @ep_is_internal: indicates an internal emulated endpoint device is connected
+ * @has_apb_err_disable: indicates the controller can be configured to prevent
+ * unsupported request from being forwarded as an APB bus error
* @need_ob_cfg: indicates SW needs to configure the outbound mapping window
* @ob: outbound mapping parameters
* @msi: MSI data
@@ -74,6 +76,7 @@ struct iproc_pcie {
struct phy *phy;
int (*map_irq)(const struct pci_dev *, u8, u8);
bool ep_is_internal;
+ bool has_apb_err_disable;
bool need_ob_cfg;
struct iproc_pcie_ob ob;
struct iproc_msi *msi;