* [PATCH] Fix netxen module device table
@ 2008-06-26 15:54 Ben Collins
0 siblings, 0 replies; only message in thread
From: Ben Collins @ 2008-06-26 15:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: kernel list
This was broken because PCI_DEVICE_CLASS() was duplicating (and
overwriting) .vendor and .device to PCI_ANY.
Signed-off-by: Ben Collins <ben.collins@canonical.com>
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,}
};
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-26 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 15:54 [PATCH] Fix netxen module device table Ben Collins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox