Message ID | 1543925069-8838-4-git-send-email-galpress@amazon.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Elastic Fabric Adapter (EFA) driver | expand |
On Tue, Dec 04, 2018 at 02:04:19PM +0200, Gal Pressman wrote: > Add EFA PCI device IDs. > > Signed-off-by: Gal Pressman <galpress@amazon.com> > drivers/infiniband/hw/efa/efa_pci_id_tbl.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 drivers/infiniband/hw/efa/efa_pci_id_tbl.h > > diff --git a/drivers/infiniband/hw/efa/efa_pci_id_tbl.h b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h > new file mode 100644 > index 000000000000..3bb21a95fe54 > +++ b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ > +/* > + * Copyright 2018 Amazon.com, Inc. or its affiliates. > + */ > + > +#ifndef _EFA_PCI_ID_TBL_H_ > +#define _EFA_PCI_ID_TBL_H_ > + > +#ifndef PCI_VENDOR_ID_AMAZON > +#define PCI_VENDOR_ID_AMAZON 0x1d0f > +#endif > + > +#ifndef PCI_DEV_ID_EFA_VF > +#define PCI_DEV_ID_EFA_VF 0xefa0 > +#endif > + > +#define EFA_PCI_DEVICE_ID(devid) \ > + { PCI_VDEVICE(AMAZON, devid) } > + > +static const struct pci_device_id efa_pci_tbl[] = { > + EFA_PCI_DEVICE_ID(PCI_DEV_ID_EFA_VF), > + { } > +}; Don't put static data in headers files, yuk. Jason
On 04-Dec-18 17:33, Jason Gunthorpe wrote: > On Tue, Dec 04, 2018 at 02:04:19PM +0200, Gal Pressman wrote: >> Add EFA PCI device IDs. >> >> Signed-off-by: Gal Pressman <galpress@amazon.com> >> drivers/infiniband/hw/efa/efa_pci_id_tbl.h | 25 +++++++++++++++++++++++++ >> 1 file changed, 25 insertions(+) >> create mode 100644 drivers/infiniband/hw/efa/efa_pci_id_tbl.h >> >> diff --git a/drivers/infiniband/hw/efa/efa_pci_id_tbl.h b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h >> new file mode 100644 >> index 000000000000..3bb21a95fe54 >> +++ b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h >> @@ -0,0 +1,25 @@ >> +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ >> +/* >> + * Copyright 2018 Amazon.com, Inc. or its affiliates. >> + */ >> + >> +#ifndef _EFA_PCI_ID_TBL_H_ >> +#define _EFA_PCI_ID_TBL_H_ >> + >> +#ifndef PCI_VENDOR_ID_AMAZON >> +#define PCI_VENDOR_ID_AMAZON 0x1d0f >> +#endif >> + >> +#ifndef PCI_DEV_ID_EFA_VF >> +#define PCI_DEV_ID_EFA_VF 0xefa0 >> +#endif >> + >> +#define EFA_PCI_DEVICE_ID(devid) \ >> + { PCI_VDEVICE(AMAZON, devid) } >> + >> +static const struct pci_device_id efa_pci_tbl[] = { >> + EFA_PCI_DEVICE_ID(PCI_DEV_ID_EFA_VF), >> + { } >> +}; > > Don't put static data in headers files, yuk. > > Jason > Sure, will change.
diff --git a/drivers/infiniband/hw/efa/efa_pci_id_tbl.h b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h new file mode 100644 index 000000000000..3bb21a95fe54 --- /dev/null +++ b/drivers/infiniband/hw/efa/efa_pci_id_tbl.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ +/* + * Copyright 2018 Amazon.com, Inc. or its affiliates. + */ + +#ifndef _EFA_PCI_ID_TBL_H_ +#define _EFA_PCI_ID_TBL_H_ + +#ifndef PCI_VENDOR_ID_AMAZON +#define PCI_VENDOR_ID_AMAZON 0x1d0f +#endif + +#ifndef PCI_DEV_ID_EFA_VF +#define PCI_DEV_ID_EFA_VF 0xefa0 +#endif + +#define EFA_PCI_DEVICE_ID(devid) \ + { PCI_VDEVICE(AMAZON, devid) } + +static const struct pci_device_id efa_pci_tbl[] = { + EFA_PCI_DEVICE_ID(PCI_DEV_ID_EFA_VF), + { } +}; + +#endif /* _EFA_PCI_ID_TBL_H_ */
Add EFA PCI device IDs. Signed-off-by: Gal Pressman <galpress@amazon.com> --- drivers/infiniband/hw/efa/efa_pci_id_tbl.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 drivers/infiniband/hw/efa/efa_pci_id_tbl.h