* [PATCH repost 0/3] Support Netronome NFP6000 family quirks
@ 2015-09-30 6:35 Simon Horman
2015-09-30 6:35 ` [PATCH repost 1/3] PCI: Support PCIe devices with short cfg_size Simon Horman
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Simon Horman @ 2015-09-30 6:35 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman
Hi,
this short patch-set adds support for Netronome NFP6000 family quirks.
Base:
This patchset is based on the next branch of Bjorn Helgaas's PCI tree.
About NFP6000 Drivers (someone is bound to ask):
My understanding is that Netronome is actively working on preparing to
submit NFP6000 family drivers to mainline. For now they can be found on
github at https://github.com/Netronome/nfp-drv-kmods
Jason S. McMullan (3):
PCI: Support PCIe devices with short cfg_size
PCI: Add Netronome vendor and device IDs
PCI: Support Netronome NFP6000 family quirks
drivers/pci/pci-sysfs.c | 18 +++++++++---------
drivers/pci/quirks.c | 11 +++++++++++
include/linux/pci_ids.h | 6 ++++++
3 files changed, 26 insertions(+), 9 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH repost 1/3] PCI: Support PCIe devices with short cfg_size
2015-09-30 6:35 [PATCH repost 0/3] Support Netronome NFP6000 family quirks Simon Horman
@ 2015-09-30 6:35 ` Simon Horman
2015-09-30 6:35 ` [PATCH repost 2/3] PCI: Add Netronome vendor and device IDs Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-09-30 6:35 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman
From: "Jason S. McMullan" <jason.mcmullan@netronome.com>
If a PCIe device has a 'quirk' where the quirk modifies the
pci_dev->cfg_size to be less than PCI_CFG_SPACE_EXP_SIZE, but greater than
PCI_CFG_SPACE_SIZE then the pci sysfs interface truncates the readable size
to PCI_CFG_SPACE_SIZE.
This patch corrects this issue.
This is in preparation for adding a quirk for such a case.
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
[simon: edited changelog]
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
drivers/pci/pci-sysfs.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 312f23a8429c..cf8eba5d8e14 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -1369,10 +1369,10 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
if (!sysfs_initialized)
return -EACCES;
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
- retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr);
- else
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr);
+ else
+ retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr);
if (retval)
goto err;
@@ -1424,10 +1424,10 @@ err_rom_file:
err_resource_files:
pci_remove_resource_files(pdev);
err_config_file:
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
- sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
- else
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr);
+ else
+ sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
err:
return retval;
}
@@ -1461,10 +1461,10 @@ void pci_remove_sysfs_dev_files(struct pci_dev *pdev)
pci_remove_capabilities_sysfs(pdev);
- if (pdev->cfg_size < PCI_CFG_SPACE_EXP_SIZE)
- sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
- else
+ if (pdev->cfg_size > PCI_CFG_SPACE_SIZE)
sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr);
+ else
+ sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr);
pci_remove_resource_files(pdev);
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH repost 2/3] PCI: Add Netronome vendor and device IDs
2015-09-30 6:35 [PATCH repost 0/3] Support Netronome NFP6000 family quirks Simon Horman
2015-09-30 6:35 ` [PATCH repost 1/3] PCI: Support PCIe devices with short cfg_size Simon Horman
@ 2015-09-30 6:35 ` Simon Horman
2015-09-30 6:35 ` [PATCH repost 3/3] PCI: Support Netronome NFP6000 family quirks Simon Horman
2015-12-08 0:46 ` [PATCH repost 0/3] " Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-09-30 6:35 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman
From: "Jason S. McMullan" <jason.mcmullan@netronome.com>
Device IDs for the Netronome NFP3200, NFP3240, NFP6000, and
NFP6000 SR-IOV devices.
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
[simon: edited changelog]
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
include/linux/pci_ids.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d9ba49cedc5d..526e2c12ae59 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2495,6 +2495,12 @@
#define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700
#define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff
+#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_NFP6000 0x6000
+#define PCI_DEVICE_ID_NETRONOME_NFP6000_VF 0x6003
+
#define PCI_VENDOR_ID_QMI 0x1a32
#define PCI_VENDOR_ID_AZWAVE 0x1a3b
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH repost 3/3] PCI: Support Netronome NFP6000 family quirks
2015-09-30 6:35 [PATCH repost 0/3] Support Netronome NFP6000 family quirks Simon Horman
2015-09-30 6:35 ` [PATCH repost 1/3] PCI: Support PCIe devices with short cfg_size Simon Horman
2015-09-30 6:35 ` [PATCH repost 2/3] PCI: Add Netronome vendor and device IDs Simon Horman
@ 2015-09-30 6:35 ` Simon Horman
2015-12-08 0:46 ` [PATCH repost 0/3] " Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-09-30 6:35 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci, Simon Horman
From: "Jason S. McMullan" <jason.mcmullan@netronome.com>
The NFP6000 has an errata where reading/writing to PCI config
space addresses above 0x600 can cause the NFP to generate PCIe
completion timeouts.
This patch addresses this issue, by limiting the NFP6000's config
space size to 0x600 bytes.
Signed-off-by: Jason S. McMullan <jason.mcmullan@netronome.com>
[simon: edited changelog]
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
drivers/pci/quirks.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 83be0e555548..78537378021b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -287,6 +287,17 @@ static void quirk_citrine(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, quirk_citrine);
+/*
+ * This chip can cause bus lockups if config addresses above 0x600
+ * are read or written to.
+ */
+static void quirk_nfp6000(struct pci_dev *dev)
+{
+ dev->cfg_size = 0x600;
+}
+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);
+
/* On IBM Crocodile ipr SAS adapters, expand BAR to system page size */
static void quirk_extend_bar_to_page(struct pci_dev *dev)
{
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH repost 0/3] Support Netronome NFP6000 family quirks
2015-09-30 6:35 [PATCH repost 0/3] Support Netronome NFP6000 family quirks Simon Horman
` (2 preceding siblings ...)
2015-09-30 6:35 ` [PATCH repost 3/3] PCI: Support Netronome NFP6000 family quirks Simon Horman
@ 2015-12-08 0:46 ` Bjorn Helgaas
3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2015-12-08 0:46 UTC (permalink / raw)
To: Simon Horman; +Cc: Bjorn Helgaas, linux-pci
On Wed, Sep 30, 2015 at 03:35:04PM +0900, Simon Horman wrote:
> Hi,
>
> this short patch-set adds support for Netronome NFP6000 family quirks.
>
> Base:
>
> This patchset is based on the next branch of Bjorn Helgaas's PCI tree.
>
> About NFP6000 Drivers (someone is bound to ask):
>
> My understanding is that Netronome is actively working on preparing to
> submit NFP6000 family drivers to mainline. For now they can be found on
> github at https://github.com/Netronome/nfp-drv-kmods
>
> Jason S. McMullan (3):
> PCI: Support PCIe devices with short cfg_size
> PCI: Add Netronome vendor and device IDs
> PCI: Support Netronome NFP6000 family quirks
>
> drivers/pci/pci-sysfs.c | 18 +++++++++---------
> drivers/pci/quirks.c | 11 +++++++++++
> include/linux/pci_ids.h | 6 ++++++
> 3 files changed, 26 insertions(+), 9 deletions(-)
Applied to pci/misc for v4.5, thanks!
Bjorn
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-08 0:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30 6:35 [PATCH repost 0/3] Support Netronome NFP6000 family quirks Simon Horman
2015-09-30 6:35 ` [PATCH repost 1/3] PCI: Support PCIe devices with short cfg_size Simon Horman
2015-09-30 6:35 ` [PATCH repost 2/3] PCI: Add Netronome vendor and device IDs Simon Horman
2015-09-30 6:35 ` [PATCH repost 3/3] PCI: Support Netronome NFP6000 family quirks Simon Horman
2015-12-08 0:46 ` [PATCH repost 0/3] " 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.