Browse Source

[vxge] Add stub vxge.c file so bin/vxge.usb can be built

The vxge driver code is split over several files, including vxge_main.c.
This causes the build system and ROM-o-matic to see the driver as
"vxge_main".

This patch adds a stub vxge.c which takes up no space but gives the
driver its proper name, "vxge".

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.20.1
Stefan Hajnoczi 15 years ago
parent
commit
6877c844e5
2 changed files with 23 additions and 4 deletions
  1. 18
    0
      src/drivers/net/vxge/vxge.c
  2. 5
    4
      src/drivers/net/vxge/vxge_main.c

+ 18
- 0
src/drivers/net/vxge/vxge.c View File

@@ -0,0 +1,18 @@
1
+/** @file Stub file for vxge driver
2
+ *
3
+ * This file drags in the rest of the driver for Neterion Inc's X3100 Series
4
+ * 10GbE PCIe I/O Virtualized Server Adapter, allowing the driver to be built
5
+ * as "vxge" even though the code is in vxge_* named files.
6
+ */
7
+
8
+FILE_LICENCE(GPL2_OR_LATER);
9
+
10
+#include <gpxe/pci.h>
11
+
12
+REQUIRE_OBJECT(vxge_main);
13
+
14
+/** vxge PCI IDs for util/parserom.pl which are put into bin/NIC */
15
+static struct pci_device_id vxge_nics[] __unused = {
16
+	/* If you change this, also adjust vxge_main_nics[] in vxge_main.c */
17
+	PCI_ROM(0x17d5, 0x5833, "vxge-x3100", "Neterion X3100 Series", 0),
18
+};

+ 5
- 4
src/drivers/net/vxge/vxge_main.c View File

@@ -712,13 +712,14 @@ static struct net_device_operations vxge_operations = {
712 712
 	.irq            = vxge_irq,
713 713
 };
714 714
 
715
-static struct pci_device_id vxge_nics[] = {
716
-	PCI_ROM(0x17d5, 0x5833, "vxge-x3100", "Neterion X3100 Series", 0),
715
+static struct pci_device_id vxge_main_nics[] = {
716
+	/* If you change this, also adjust vxge_nics[] in vxge.c */
717
+	PCI_ID(0x17d5, 0x5833, "vxge-x3100", "Neterion X3100 Series", 0),
717 718
 };
718 719
 
719 720
 struct pci_driver vxge_driver __pci_driver = {
720
-	.ids = vxge_nics,
721
-	.id_count = (sizeof(vxge_nics) / sizeof(vxge_nics[0])),
721
+	.ids = vxge_main_nics,
722
+	.id_count = (sizeof(vxge_main_nics) / sizeof(vxge_main_nics[0])),
722 723
 	.probe = vxge_probe,
723 724
 	.remove = vxge_remove,
724 725
 };

Loading…
Cancel
Save