All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: quirk cavium: Add device ID range check
@ 2017-03-17  7:16 Manish Jaggi
  2017-03-17 22:27 ` Alex Williamson
  2017-03-30 23:53 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Manish Jaggi @ 2017-03-17  7:16 UTC (permalink / raw)
  To: linux-pci, linux-kernel; +Cc: Alex Williamson, Daney, David, bhelgaas

  ACS quirk applies to devices with ID in the range a000-a0XX.
  The patch adds a check.This matches on-chip pci devices for
  CN81xx/CN83xx/CN88xx

  This patch adds check to
  b404bcfbf0 : PCI: Add ACS quirk for all Cavium devices

Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
---
  drivers/pci/quirks.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f754453..178242d 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4094,6 +4094,9 @@ static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags)
  	acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
  		       PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
  
+	if (!((dev->device >= 0xa000) && (dev->device <= 0xa0ff)))
+		return -ENOTTY;
+
  	return acs_flags ? 0 : 1;
  }
  
-- 
2.7.4

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

* Re: [PATCH] pci: quirk cavium: Add device ID range check
  2017-03-17  7:16 [PATCH] pci: quirk cavium: Add device ID range check Manish Jaggi
@ 2017-03-17 22:27 ` Alex Williamson
  2017-03-30 23:53 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2017-03-17 22:27 UTC (permalink / raw)
  To: Manish Jaggi; +Cc: linux-pci, linux-kernel, Daney, David, bhelgaas

On Fri, 17 Mar 2017 12:46:29 +0530
Manish Jaggi <mjaggi@caviumnetworks.com> wrote:

>   ACS quirk applies to devices with ID in the range a000-a0XX.
>   The patch adds a check.This matches on-chip pci devices for
>   CN81xx/CN83xx/CN88xx
> 
>   This patch adds check to
>   b404bcfbf0 : PCI: Add ACS quirk for all Cavium devices
> 
> Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
> Acked-by: David Daney <david.daney@cavium.com>

Fixes: b404bcfbf035 ("PCI: Add ACS quirk for all Cavium devices")
Reported-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>

Thanks

> ---
>   drivers/pci/quirks.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index f754453..178242d 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -4094,6 +4094,9 @@ static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags)
>   	acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
>   		       PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
>   
> +	if (!((dev->device >= 0xa000) && (dev->device <= 0xa0ff)))
> +		return -ENOTTY;
> +
>   	return acs_flags ? 0 : 1;
>   }
>   

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

* Re: [PATCH] pci: quirk cavium: Add device ID range check
  2017-03-17  7:16 [PATCH] pci: quirk cavium: Add device ID range check Manish Jaggi
  2017-03-17 22:27 ` Alex Williamson
@ 2017-03-30 23:53 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2017-03-30 23:53 UTC (permalink / raw)
  To: Manish Jaggi
  Cc: linux-pci, linux-kernel, Alex Williamson, Daney, David, bhelgaas

On Fri, Mar 17, 2017 at 12:46:29PM +0530, Manish Jaggi wrote:
>  ACS quirk applies to devices with ID in the range a000-a0XX.
>  The patch adds a check.This matches on-chip pci devices for
>  CN81xx/CN83xx/CN88xx
> 
>  This patch adds check to
>  b404bcfbf0 : PCI: Add ACS quirk for all Cavium devices
> 
> Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
> Acked-by: David Daney <david.daney@cavium.com>

Applied with Alex's ack to pci/host-thunder for v4.12, thanks!

> ---
>  drivers/pci/quirks.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index f754453..178242d 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -4094,6 +4094,9 @@ static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags)
>  	acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
>  		       PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
> +	if (!((dev->device >= 0xa000) && (dev->device <= 0xa0ff)))
> +		return -ENOTTY;
> +
>  	return acs_flags ? 0 : 1;
>  }
> -- 
> 2.7.4
> 
> 

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

end of thread, other threads:[~2017-03-30 23:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  7:16 [PATCH] pci: quirk cavium: Add device ID range check Manish Jaggi
2017-03-17 22:27 ` Alex Williamson
2017-03-30 23:53 ` Bjorn Helgaas

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.