PCI: iproc: Allow more than slot 0 on PAXC
Subsystems (2)
PATCH v2 1/1 PCI: iproc: Allow more than slot 0 on PAXC
The iproc host driver limits the number of slots that are available on PAXC devices. Enforcing this limit prevents VFs from being created beyond the first port. After this change it is possible to create VFs associated with all four devices.
The first four devices below are the PFs and the next four are the newly created VFs:
0008:01:00.0 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.1 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.2 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.3 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:02.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function
v2: Added check to only allow this on PAXCv1 hardware at the suggestion of Ray Jui.
--- drivers/pci/host/pcie-iproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/host/pcie-iproc.c +3 -3
@@ -478,11 +478,11 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, }/* -* PAXC is connected to an internally emulated EP within the SoC. It -* allows only one device. +* PAXC is connected to an internally emulated EP within the SoC. +* Allow multiple slots only on PAXCv1 hardware. */ if (pcie->ep_is_internal) -if (slot >0 ) +if (slot >0 && pcie->type !=IPROC_PCIE_PAXC )return NULL ;/* EP device access */
Signature · 1 line
2.1.0
Quoted 35 lines · Andy Gospodarek
The iproc host driver limits the number of slots that are available on PAXC devices. Enforcing this limit prevents VFs from being created beyond the first port. After this change it is possible to create VFs associated with all four devices.
The first four devices below are the PFs and the next four are the newly created VFs:
0008:01:00.0 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.1 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.2 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.3 Ethernet controller: Broadcom Limited Device 16cd
0008:01:00.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:02.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Functionv2: Added check to only allow this on PAXCv1 hardware at the suggestion of Ray Jui.
Signed-off-by Andy Gospodarek <[email protected]>--- drivers/pci/host/pcie-iproc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/pci/host/pcie-iproc.c +0
-1@@ -478,11 +478,11 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, }/* -* PAXC is connected to an internally emulated EP within the SoC. It
drivers/pci/host/pcie-iproc.c static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, · line 488
Quoted 10 lines
drivers/pci/host/pcie-iproc.c +3
-2-* allows only one device. +* PAXC is connected to an internally emulated EP within the SoC. +* Allow multiple slots only on PAXCv1 hardware. */ if (pcie->ep_is_internal) -if (slot >0 ) +if (slot >0 && pcie->type !=IPROC_PCIE_PAXC )return NULL ;/* EP device access */
This change looks good to me. Thanks!