Skip to contentSkip to conversation

Fix netxen module device table

PATCH New Ben Collins 1 participant 1 message Jun 26, 2008 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix netxen module device table

This was broken because PCI_DEVICE_CLASS() was duplicating (and overwriting) .vendor and .device to PCI_ANY.

drivers/net/netxen/netxen_nic_main.c +11 -8
index 6797ed0..0ab5e27 100644
@@ -70,15 +70,18 @@ static void netxen_nic_poll_controller(struct net_device *netdev);
 static irqreturn_t netxen_intr(int irq, void *data);
 static irqreturn_t netxen_msi_intr(int irq, void *data);
 
+#define NETXEN_DEVICE_CLASS \
+	.class = 0x020000, .class_mask = ~0
+
 /*  PCI Device ID Table  */
-static struct pci_device_id netxen_pci_tbl[] __devinitdata = {
-	{PCI_DEVICE(0x4040, 0x0001), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0002), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0003), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0004), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0005), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0024), PCI_DEVICE_CLASS(0x020000, ~0)},
-	{PCI_DEVICE(0x4040, 0x0025), PCI_DEVICE_CLASS(0x020000, ~0)},
+static DEFINE_PCI_DEVICE_TABLE(netxen_pci_tbl) = {
+	{PCI_DEVICE(0x4040, 0x0001), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0002), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0003), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0004), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0005), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0024), NETXEN_DEVICE_CLASS},
+	{PCI_DEVICE(0x4040, 0x0025), NETXEN_DEVICE_CLASS},
 	{0,}
 };