[PATCH] Fix netxen module device table

From: Ben Collins
Date: Thu Jun 26 2008 - 11:55:14 EST


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

Signed-off-by: Ben Collins <ben.collins@xxxxxxxxxxxxx>

diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 6797ed0..0ab5e27 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -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,}
};


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/