[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.00.0806232249310.20801@unm84.unminc.com>
Date: Mon, 23 Jun 2008 22:53:17 -0700
From: Dhananjay Phadke <dhananjay@...xen.com>
To: Al Viro <viro@...IV.linux.org.uk>
CC: Jeff Garzik <jgarzik@...ox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] fix netxen_pci_tbl[] breakage
oops, that was oversight in last patch. changing order of PCI_DEVICE(),
PCI_DEVICE_CLASS() would have worked as well.
Signed-off-by: Dhananjay Phadke <dhananjay@...xen.com>
On Sun, 22 Jun 2008, Al Viro wrote:
> PCI_DEVICE_CLASS sets .device and .vendor to PCI_ANY_DEV,
> which overrides the effect of preceding PCI_DEVICE() and makes
> all elements of netxen_pci_tbl[] identical. Introduced in the
> commit dcd56fdbaeae1008044687b973c4a3e852e8a726.
>
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
> index 6797ed0..63cd67b 100644
> --- a/drivers/net/netxen/netxen_nic_main.c
> +++ b/drivers/net/netxen/netxen_nic_main.c
> @@ -71,14 +71,18 @@ static irqreturn_t netxen_intr(int irq, void *data);
> static irqreturn_t netxen_msi_intr(int irq, void *data);
>
> /* PCI Device ID Table */
> +#define ENTRY(device) \
> + {PCI_DEVICE(0x4040, (device)), \
> + .class = PCI_CLASS_NETWORK_ETHERNET << 8, .class_mask = ~0}
> +
> 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)},
> + ENTRY(0x0001),
> + ENTRY(0x0002),
> + ENTRY(0x0003),
> + ENTRY(0x0004),
> + ENTRY(0x0005),
> + ENTRY(0x0024),
> + ENTRY(0x0025),
> {0,}
> };
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists