All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next v2] PCI: iproc: Allow more than slot 0 on PAXC
@ 2017-01-06 21:35 Andy Gospodarek
  2017-01-06 21:40 ` Ray Jui
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Gospodarek @ 2017-01-06 21:35 UTC (permalink / raw)
  To: linux-pci; +Cc: Ray Jui, 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 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 */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH next v2] PCI: iproc: Allow more than slot 0 on PAXC
  2017-01-06 21:35 [PATCH next v2] PCI: iproc: Allow more than slot 0 on PAXC Andy Gospodarek
@ 2017-01-06 21:40 ` Ray Jui
  0 siblings, 0 replies; 2+ messages in thread
From: Ray Jui @ 2017-01-06 21:40 UTC (permalink / raw)
  To: Andy Gospodarek, linux-pci; +Cc: Ray Jui



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>





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-06 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 21:35 [PATCH next v2] PCI: iproc: Allow more than slot 0 on PAXC Andy Gospodarek
2017-01-06 21:40 ` Ray Jui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.