aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/controller/pcie-iproc.h
diff options
context:
space:
mode:
authorRay Jui <ray.jui@broadcom.com>2018-06-11 17:21:06 -0700
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-07-13 11:56:55 +0100
commitf78e60a29d4ff27531770cf2c6eee89292379209 (patch)
tree10d900903255dc58311052926fe2298624532ac5 /drivers/pci/controller/pcie-iproc.h
parentPCI: iproc: Disable MSI parsing in certain PAXC blocks (diff)
downloadwireguard-linux-f78e60a29d4ff27531770cf2c6eee89292379209.tar.xz
wireguard-linux-f78e60a29d4ff27531770cf2c6eee89292379209.zip
PCI: iproc: Reject unconfigured physical functions from PAXC
PAXC is an emulated PCIe root complex internally in various Broadcom based SoCs. PAXC internally connects to the embedded network processor within these SoCs, with the embedeed network processor exposed as an endpoint device. The number of physical functions from the embedded network processor that can be accessed depends on the firmware configuration. Unfortunately, due to an ASIC bug, unconfigured physical functions cannot be properly hidden from the root complex during enumerattion. As a result, config write access to these unconfigured physical functions during enumeration will cause a bus lock up on the embedded network processor. Fortunately, these unconfigured physical functions contain a very specific, staled PCIe device ID 0x168e. By making use of this device ID, one is able to terminate the enumeration early in the vendor/device ID config read. Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Oza Pawandeep <poza@codeaurora.org>
Diffstat (limited to 'drivers/pci/controller/pcie-iproc.h')
-rw-r--r--drivers/pci/controller/pcie-iproc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/controller/pcie-iproc.h b/drivers/pci/controller/pcie-iproc.h
index 9d5cfeea3046..4f03ea539805 100644
--- a/drivers/pci/controller/pcie-iproc.h
+++ b/drivers/pci/controller/pcie-iproc.h
@@ -58,6 +58,9 @@ 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
+ * @iproc_cfg_read: indicates the iProc config read function should be used
+ * @rej_unconfig_pf: indicates the root complex needs to detect and reject
+ * enumeration against unconfigured physical functions emulated in the ASIC
* @has_apb_err_disable: indicates the controller can be configured to prevent
* unsupported request from being forwarded as an APB bus error
* @fix_paxc_cap: indicates the controller has corrupted capability list in its
@@ -86,6 +89,8 @@ struct iproc_pcie {
struct phy *phy;
int (*map_irq)(const struct pci_dev *, u8, u8);
bool ep_is_internal;
+ bool iproc_cfg_read;
+ bool rej_unconfig_pf;
bool has_apb_err_disable;
bool fix_paxc_cap;