From: Ben Collins <ben.collins@canonical.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix netxen module device table
Date: Thu, 26 Jun 2008 11:54:46 -0400 [thread overview]
Message-ID: <1214495686.7150.7.camel@cunning> (raw)
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,}
};
reply other threads:[~2008-06-26 15:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1214495686.7150.7.camel@cunning \
--to=ben.collins@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.