diff mbox

[next,v2] PCI: iproc: Allow more than slot 0 on PAXC

Message ID 1483738533-18300-1-git-send-email-gospo@broadcom.com
State Changes Requested
Headers show

Commit Message

Andy Gospodarek Jan. 6, 2017, 9:35 p.m. UTC
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.

Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
---
 drivers/pci/host/pcie-iproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ray Jui Jan. 6, 2017, 9:40 p.m. UTC | #1
On 1/6/2017 1:35 PM, Andy Gospodarek wrote:
> 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.
> 
> Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
> ---
>  drivers/pci/host/pcie-iproc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index 3ebc025..ae101d6 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -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 */
> 

This change looks good to me. Thanks!

Acked-by: Ray Jui <ray.jui@broadcom.com>




--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index 3ebc025..ae101d6 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -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 */