Skip to content

Commit

Permalink
nfp: Use PCI_DEVICE_ID_NETRONOME_NFP* defines
Browse files Browse the repository at this point in the history
Use PCI_DEVICE_ID_NETRONOME_NFP*, defined in linux/pci_ids.h,
rather than replicating the same values in the NFP driver.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Horman authored and David S. Miller committed Feb 17, 2017
1 parent 806a837 commit 3b47352
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/netronome/nfp/nfp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ static const char nfp_driver_name[] = "nfp";
const char nfp_driver_version[] = VERMAGIC_STRING;

static const struct pci_device_id nfp_pci_device_ids[] = {
{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_NFP6000,
{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP6000,
PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
PCI_ANY_ID, 0,
},
{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_NFP4000,
{ PCI_VENDOR_ID_NETRONOME, PCI_DEVICE_ID_NETRONOME_NFP4000,
PCI_VENDOR_ID_NETRONOME, PCI_ANY_ID,
PCI_ANY_ID, 0,
},
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ static int enable_bars(struct nfp6000_pcie *nfp, u16 interface)
nfp->expl.data = bar->iomem + NFP_PCIE_SRAM + 0x1000;
}

if (nfp->pdev->device == PCI_DEVICE_NFP4000 ||
nfp->pdev->device == PCI_DEVICE_NFP6000) {
if (nfp->pdev->device == PCI_DEVICE_ID_NETRONOME_NFP4000 ||
nfp->pdev->device == PCI_DEVICE_ID_NETRONOME_NFP6000) {
nfp->iomem.csr = bar->iomem + NFP_PCIE_BAR(0);
expl_groups = 4;
} else {
Expand Down
5 changes: 0 additions & 5 deletions drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@

#define PCI_64BIT_BAR_COUNT 3

/* NFP hardware vendor/device ids.
*/
#define PCI_DEVICE_NFP4000 0x4000
#define PCI_DEVICE_NFP6000 0x6000

#define NFP_CPP_NUM_TARGETS 16

struct device;
Expand Down

0 comments on commit 3b47352

Please sign in to comment.