linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000
@ 2015-12-11  2:30 Simon Horman
  2015-12-11  2:30 ` [PATCH 1/2] PCI: Add Netronome NFP4000 device ID Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Simon Horman @ 2015-12-11  2:30 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman

Like the NFP6000 the NFP4000 as an erratum where reading/writing to PCI
config space addresses above 0x600 can cause the NFP to generate PCIe
completion timeouts.

This short series extends usage quirk_nfp6000, which handles the above
problem by limiting config space size to 0x600 bytes, to the NFP4000.

Compile tested on top of the pci/misc branch.

Simon Horman (2):
  PCI: Add Netronome NFP4000 device ID
  PCI: Limit config space size for Netronome NFP4000

 drivers/pci/quirks.c    | 1 +
 include/linux/pci_ids.h | 1 +
 2 files changed, 2 insertions(+)

-- 
2.1.4


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

* [PATCH 1/2] PCI: Add Netronome NFP4000 device ID
  2015-12-11  2:30 [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
@ 2015-12-11  2:30 ` Simon Horman
  2015-12-11  2:30 ` [PATCH 2/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
  2016-01-15 23:32 ` [PATCH 0/2] " Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2015-12-11  2:30 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman

This is the device ID for the PF of the NFP4000.
The device ID for the VF, 0x6003, is already present
as PCI_DEVICE_ID_NETRONOME_NFP6000_VF.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 include/linux/pci_ids.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 526e2c12ae59..37f05cb1dfd6 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2498,6 +2498,7 @@
 #define PCI_VENDOR_ID_NETRONOME		0x19ee
 #define PCI_DEVICE_ID_NETRONOME_NFP3200	0x3200
 #define PCI_DEVICE_ID_NETRONOME_NFP3240	0x3240
+#define PCI_DEVICE_ID_NETRONOME_NFP4000	0x4000
 #define PCI_DEVICE_ID_NETRONOME_NFP6000	0x6000
 #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF	0x6003
 
-- 
2.1.4


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

* [PATCH 2/2] PCI: Limit config space size for Netronome NFP4000
  2015-12-11  2:30 [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
  2015-12-11  2:30 ` [PATCH 1/2] PCI: Add Netronome NFP4000 device ID Simon Horman
@ 2015-12-11  2:30 ` Simon Horman
  2016-01-15 23:32 ` [PATCH 0/2] " Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2015-12-11  2:30 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman

Like the NFP6000 the NFP4000 as an erratum where reading/writing to PCI
config space addresses above 0x600 can cause the NFP to generate PCIe
completion timeouts.

Limit the NFP4000's PF's config space size to 0x600 bytes as is already
done for the NFP6000.

The NFP4000's VF is 0x6004 (PCI_DEVICE_ID_NETRONOME_NFP6000_VF), the same
device ID as the NFP6000's VF. Thus its config space is already limited
by the existing use of quirk_nfp6000.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/pci/quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 83e93d7ca4b9..8b13b41257b8 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -295,6 +295,7 @@ static void quirk_nfp6000(struct pci_dev *dev)
 {
 	dev->cfg_size = 0x600;
 }
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME,	PCI_DEVICE_ID_NETRONOME_NFP4000,	quirk_nfp6000);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME,	PCI_DEVICE_ID_NETRONOME_NFP6000,	quirk_nfp6000);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETRONOME,	PCI_DEVICE_ID_NETRONOME_NFP6000_VF,	quirk_nfp6000);
 
-- 
2.1.4


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

* Re: [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000
  2015-12-11  2:30 [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
  2015-12-11  2:30 ` [PATCH 1/2] PCI: Add Netronome NFP4000 device ID Simon Horman
  2015-12-11  2:30 ` [PATCH 2/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
@ 2016-01-15 23:32 ` Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2016-01-15 23:32 UTC (permalink / raw)
  To: Simon Horman; +Cc: Bjorn Helgaas, linux-pci

On Fri, Dec 11, 2015 at 11:30:10AM +0900, Simon Horman wrote:
> Like the NFP6000 the NFP4000 as an erratum where reading/writing to PCI
> config space addresses above 0x600 can cause the NFP to generate PCIe
> completion timeouts.
> 
> This short series extends usage quirk_nfp6000, which handles the above
> problem by limiting config space size to 0x600 bytes, to the NFP4000.
> 
> Compile tested on top of the pci/misc branch.
> 
> Simon Horman (2):
>   PCI: Add Netronome NFP4000 device ID
>   PCI: Limit config space size for Netronome NFP4000
> 
>  drivers/pci/quirks.c    | 1 +
>  include/linux/pci_ids.h | 1 +
>  2 files changed, 2 insertions(+)

Applied to pci/misc for v4.5, thanks, Simon.

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

end of thread, other threads:[~2016-01-15 23:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11  2:30 [PATCH 0/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
2015-12-11  2:30 ` [PATCH 1/2] PCI: Add Netronome NFP4000 device ID Simon Horman
2015-12-11  2:30 ` [PATCH 2/2] PCI: Limit config space size for Netronome NFP4000 Simon Horman
2016-01-15 23:32 ` [PATCH 0/2] " Bjorn Helgaas

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).