From: Jeff Garzik <jgarzik@pobox.com>
To: domen@coderock.org
Cc: netdev@oss.sgi.com, sfeldma@pobox.com, janitor@sternwelten.at,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [patch 11/26] janitor: net/tg3: pci_find_device to pci_dev_present
Date: Wed, 09 Mar 2005 15:25:42 -0500 [thread overview]
Message-ID: <422F5BC6.9020802@pobox.com> (raw)
In-Reply-To: <20050306103312.3155B1E46E@trashy.coderock.org>
domen@coderock.org wrote:
> Replace pci_find_device with pci_dev_present. Compile tested.
>
> Signed-off-by: Scott Feldman <sfeldma@pobox.com>
> Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
> Signed-off-by: Domen Puncer <domen@coderock.org>
> ---
>
>
> kj-domen/drivers/net/tg3.c | 24 ++++++++++++++----------
> 1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff -puN drivers/net/tg3.c~remove-pci-find-device-drivers_net_tg3 drivers/net/tg3.c
> --- kj/drivers/net/tg3.c~remove-pci-find-device-drivers_net_tg3 2005-03-05 16:09:45.000000000 +0100
> +++ kj-domen/drivers/net/tg3.c 2005-03-05 16:09:45.000000000 +0100
> @@ -7829,6 +7829,19 @@ static int __devinit tg3_is_sun_570X(str
>
> static int __devinit tg3_get_invariants(struct tg3 *tp)
> {
> + static struct pci_device_id write_reorder_chipsets[] = {
> + { PCI_DEVICE(PCI_VENDOR_ID_INTEL,
> + PCI_DEVICE_ID_INTEL_82801AA_8) },
> + { PCI_DEVICE(PCI_VENDOR_ID_INTEL,
> + PCI_DEVICE_ID_INTEL_82801AB_8) },
> + { PCI_DEVICE(PCI_VENDOR_ID_INTEL,
> + PCI_DEVICE_ID_INTEL_82801BA_11) },
> + { PCI_DEVICE(PCI_VENDOR_ID_INTEL,
> + PCI_DEVICE_ID_INTEL_82801BA_6) },
> + { PCI_DEVICE(PCI_VENDOR_ID_AMD,
> + PCI_DEVICE_ID_AMD_FE_GATE_700C) },
> + { },
> + };
> u32 misc_ctrl_reg;
> u32 cacheline_sz_reg;
> u32 pci_state_reg, grc_misc_cfg;
> @@ -7847,16 +7860,7 @@ static int __devinit tg3_get_invariants(
> * every mailbox register write to force the writes to be
> * posted to the chip in order.
> */
> - if (pci_find_device(PCI_VENDOR_ID_INTEL,
> - PCI_DEVICE_ID_INTEL_82801AA_8, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> - PCI_DEVICE_ID_INTEL_82801AB_8, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> - PCI_DEVICE_ID_INTEL_82801BA_11, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> - PCI_DEVICE_ID_INTEL_82801BA_6, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_AMD,
> - PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL))
> + if (pci_dev_present(write_reorder_chipsets))
> tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
seems OK to me. DaveM should be applying this, though.
Jeff
next prev parent reply other threads:[~2005-03-09 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 10:33 [patch 11/26] janitor: net/tg3: pci_find_device to pci_dev_present domen
2005-03-09 20:25 ` Jeff Garzik [this message]
2005-03-11 2:23 ` David S. Miller
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=422F5BC6.9020802@pobox.com \
--to=jgarzik@pobox.com \
--cc=davem@davemloft.net \
--cc=domen@coderock.org \
--cc=janitor@sternwelten.at \
--cc=netdev@oss.sgi.com \
--cc=sfeldma@pobox.com \
/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).