Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | From 3ac6cb020c0f2ddb42dcd790cf64118453e966a2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Shesha Sreenivasamurthy <shesha@cisco.com> |
| 3 | Date: Wed, 2 Sep 2015 08:48:41 -0700 |
| 4 | Subject: [PATCH 7/9] igb_uio: Reinstate PCI device id table, build system |
| 5 | changes |
| 6 | |
| 7 | --- |
| 8 | lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 18 +++++++++++++++++- |
| 9 | 3 files changed, 34 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c |
| 12 | index 865a276..16d2a55 100644 |
| 13 | --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c |
| 14 | +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c |
| 15 | @@ -61,6 +61,22 @@ struct rte_uio_pci_dev { |
| 16 | static char *intr_mode = NULL; |
| 17 | static enum rte_intr_mode igbuio_intr_mode_preferred = RTE_INTR_MODE_MSIX; |
| 18 | |
| 19 | +/* PCI device id table */ |
| 20 | +static struct pci_device_id igbuio_pci_ids[] = { |
| 21 | +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 22 | +#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 23 | +#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 24 | +#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 25 | +#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 26 | +#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 27 | +#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 28 | +#define RTE_PCI_DEV_ID_DECL_VICE(vend, dev) {PCI_DEVICE(vend, dev)}, |
| 29 | +#include <rte_pci_dev_ids.h> |
| 30 | +{ 0, }, |
| 31 | +}; |
| 32 | + |
| 33 | +MODULE_DEVICE_TABLE(pci, igbuio_pci_ids); |
| 34 | + |
| 35 | static inline struct rte_uio_pci_dev * |
| 36 | igbuio_get_uio_pci_dev(struct uio_info *info) |
| 37 | { |
| 38 | @@ -606,7 +622,7 @@ igbuio_config_intr_mode(char *intr_str) |
| 39 | |
| 40 | static struct pci_driver igbuio_pci_driver = { |
| 41 | .name = "igb_uio", |
| 42 | - .id_table = NULL, |
| 43 | + .id_table = igbuio_pci_ids, |
| 44 | .probe = igbuio_pci_probe, |
| 45 | .remove = igbuio_pci_remove, |
| 46 | }; |
| 47 | -- |
| 48 | 2.5.0 |
| 49 | |