From: Jeff Garzik <jgarzik@pobox.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Dhananjay Phadke <dhananjay@netxen.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] fix netxen_pci_tbl[] breakage
Date: Fri, 27 Jun 2008 01:33:00 -0400 [thread overview]
Message-ID: <48647B8C.6050007@pobox.com> (raw)
In-Reply-To: <20080623010450.GV28946@ZenIV.linux.org.uk>
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@zeniv.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,}
> };
applied
prev parent reply other threads:[~2008-06-27 5:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 1:04 [PATCH] fix netxen_pci_tbl[] breakage Al Viro
2008-06-24 5:53 ` Dhananjay Phadke
2008-06-27 5:33 ` Jeff Garzik [this message]
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=48647B8C.6050007@pobox.com \
--to=jgarzik@pobox.com \
--cc=dhananjay@netxen.com \
--cc=netdev@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).