linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: Add ACS quirk for Cavium multi-function devices
@ 2021-08-10 12:24 George Cherian
  2021-08-10 14:47 ` Bjorn Helgaas
  2021-08-20 21:14 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: George Cherian @ 2021-08-10 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-pci; +Cc: bhelgaas, George Cherian

Some Cavium endpoints are implemented as multi-function devices
without ACS capability, but they actually don't support peer-to-peer
transactions.

Add ACS quirks to declare DMA isolation.

Apply te quirk for following devices
1. BGX device found on Octeon-TX (8xxx)
2. CGX device found on Octeon-TX2 (9xxx)
3. RPM device found on Octeon-TX3 (10xxx)

Signed-off-by: George Cherian <george.cherian@marvell.com>
---
 drivers/pci/quirks.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6d74386eadc2..076932018494 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4840,6 +4840,10 @@ static const struct pci_dev_acs_enabled {
 	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
 	/* Cavium ThunderX */
 	{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
+	/* Cavium multi-function devices */
+	{ PCI_VENDOR_ID_CAVIUM, 0xA026, pci_quirk_mf_endpoint_acs },
+	{ PCI_VENDOR_ID_CAVIUM, 0xA059, pci_quirk_mf_endpoint_acs },
+	{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
 	/* APM X-Gene */
 	{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
 	/* Ampere Computing */
-- 
2.25.1


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

* Re: [PATCH] PCI: Add ACS quirk for Cavium multi-function devices
  2021-08-10 12:24 [PATCH] PCI: Add ACS quirk for Cavium multi-function devices George Cherian
@ 2021-08-10 14:47 ` Bjorn Helgaas
  2021-08-20 21:14 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2021-08-10 14:47 UTC (permalink / raw)
  To: George Cherian; +Cc: linux-kernel, linux-pci, bhelgaas

On Tue, Aug 10, 2021 at 05:54:25PM +0530, George Cherian wrote:
> Some Cavium endpoints are implemented as multi-function devices
> without ACS capability, but they actually don't support peer-to-peer
> transactions.
> 
> Add ACS quirks to declare DMA isolation.
> 
> Apply te quirk for following devices
> 1. BGX device found on Octeon-TX (8xxx)
> 2. CGX device found on Octeon-TX2 (9xxx)
> 3. RPM device found on Octeon-TX3 (10xxx)
> 
> Signed-off-by: George Cherian <george.cherian@marvell.com>
> ---
>  drivers/pci/quirks.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 6d74386eadc2..076932018494 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -4840,6 +4840,10 @@ static const struct pci_dev_acs_enabled {
>  	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
>  	/* Cavium ThunderX */
>  	{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
> +	/* Cavium multi-function devices */
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA026, pci_quirk_mf_endpoint_acs },
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA059, pci_quirk_mf_endpoint_acs },
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },

Is there a plan to add ACS capabilities to future devices, or is
Cavium just resigned to forever adding and backporting quirks?

>  	/* APM X-Gene */
>  	{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
>  	/* Ampere Computing */
> -- 
> 2.25.1
> 

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

* Re: [PATCH] PCI: Add ACS quirk for Cavium multi-function devices
  2021-08-10 12:24 [PATCH] PCI: Add ACS quirk for Cavium multi-function devices George Cherian
  2021-08-10 14:47 ` Bjorn Helgaas
@ 2021-08-20 21:14 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2021-08-20 21:14 UTC (permalink / raw)
  To: George Cherian; +Cc: linux-kernel, linux-pci, bhelgaas

On Tue, Aug 10, 2021 at 05:54:25PM +0530, George Cherian wrote:
> Some Cavium endpoints are implemented as multi-function devices
> without ACS capability, but they actually don't support peer-to-peer
> transactions.
> 
> Add ACS quirks to declare DMA isolation.
> 
> Apply te quirk for following devices
> 1. BGX device found on Octeon-TX (8xxx)
> 2. CGX device found on Octeon-TX2 (9xxx)
> 3. RPM device found on Octeon-TX3 (10xxx)
> 
> Signed-off-by: George Cherian <george.cherian@marvell.com>

Applied to pci/virtualization for v5.15, thanks!

> ---
>  drivers/pci/quirks.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 6d74386eadc2..076932018494 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -4840,6 +4840,10 @@ static const struct pci_dev_acs_enabled {
>  	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
>  	/* Cavium ThunderX */
>  	{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
> +	/* Cavium multi-function devices */
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA026, pci_quirk_mf_endpoint_acs },
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA059, pci_quirk_mf_endpoint_acs },
> +	{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
>  	/* APM X-Gene */
>  	{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
>  	/* Ampere Computing */
> -- 
> 2.25.1
> 

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

* Re: [PATCH] PCI: Add ACS quirk for Cavium multi-function devices
@ 2021-08-11  4:10 George Cherian
  0 siblings, 0 replies; 4+ messages in thread
From: George Cherian @ 2021-08-11  4:10 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-kernel, linux-pci, bhelgaas, George Cherian


Hi Bjorn,

> -----Original Message-----
> From: Bjorn Helgaas <helgaas@kernel.org>
> Sent: Tuesday, August 10, 2021 8:18 PM
> To: George Cherian <gcherian@marvell.com>
> Cc: linux-kernel@vger.kernel.org; linux-pci@vger.kernel.org;
> bhelgaas@google.com
> Subject: Re: [PATCH] PCI: Add ACS quirk for Cavium multi-function
> devices
> 
> On Tue, Aug 10, 2021 at 05:54:25PM +0530, George Cherian wrote:
> > Some Cavium endpoints are implemented as multi-function devices
> > without ACS capability, but they actually don't support peer-to-peer
> > transactions.
> >
> > Add ACS quirks to declare DMA isolation.
> >
> > Apply te quirk for following devices
> > 1. BGX device found on Octeon-TX (8xxx) 2. CGX device found on
> > Octeon-TX2 (9xxx) 3. RPM device found on Octeon-TX3 (10xxx)
> >
> > Signed-off-by: George Cherian <george.cherian@marvell.com>
> > ---
> >  drivers/pci/quirks.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index
> > 6d74386eadc2..076932018494 100644
> > --- a/drivers/pci/quirks.c
> > +++ b/drivers/pci/quirks.c
> > @@ -4840,6 +4840,10 @@ static const struct pci_dev_acs_enabled {
> >  	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R
> */
> >  	/* Cavium ThunderX */
> >  	{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
> > +	/* Cavium multi-function devices */
> > +	{ PCI_VENDOR_ID_CAVIUM, 0xA026, pci_quirk_mf_endpoint_acs },
> > +	{ PCI_VENDOR_ID_CAVIUM, 0xA059, pci_quirk_mf_endpoint_acs },
> > +	{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
> 
> Is there a plan to add ACS capabilities to future devices, or is Cavium just
> resigned to forever adding and backporting quirks?

Yes, the plan is to get these fixed in future silicons. So that we won't be 
needing any quirks.

> 
> >  	/* APM X-Gene */
> >  	{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
> >  	/* Ampere Computing */
> > --
> > 2.25.1
> >

Regards,
-George

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

end of thread, other threads:[~2021-08-20 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 12:24 [PATCH] PCI: Add ACS quirk for Cavium multi-function devices George Cherian
2021-08-10 14:47 ` Bjorn Helgaas
2021-08-20 21:14 ` Bjorn Helgaas
2021-08-11  4:10 George Cherian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).