lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 26 Jun 2008 11:54:46 -0400
From:	Ben Collins <ben.collins@...onical.com>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	kernel list <linux-kernel@...r.kernel.org>
Subject: [PATCH] Fix netxen module device table

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

Signed-off-by: Ben Collins <ben.collins@...onical.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,}
 };


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ