From: Joe Perches <joe@perches.com>
To: netdev <netdev@vger.kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>, David Miller <davem@davemloft.net>,
Matt Carlson <mcarlson@broadcom.com>,
Michael Chan <mchan@broadcom.com>
Subject: tg3 question: Why use misc_host_ctrl not pci_chip_rev_id here?
Date: Fri, 15 Feb 2013 14:41:16 -0800 [thread overview]
Message-ID: <1360968076.21068.28.camel@joe-AO722> (raw)
This code is in the original 2002 tg3 commit from Jeff.
(line 15764 today)
static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent)
[]
if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0 &&
!tg3_flag(tp, PCIX_TARGET_HWBUG)) {
(15764) u32 chiprevid = GET_CHIP_REV_ID(tp->misc_host_ctrl)
if (chiprevid == CHIPREV_ID_5701_A0 ||
chiprevid == CHIPREV_ID_5701_B0 ||
chiprevid == CHIPREV_ID_5701_B2 ||
chiprevid == CHIPREV_ID_5701_B5) {
This is the only test of GET_CHIP_REV_ID.
Shouldn't that GET_CHIP_REV_ID(tp->misc_host_ctrl)
and the tests below it be converted to tests like
tp->pci_chip_rev_id == CHIPREV_ID_5701_A0
to be similar to all the pci_chip_rev_id tests that
the code in the same function uses?
It seems to me through a shallow reading that it's
the same value as tg3_detect_asic_rev() sets it.
next reply other threads:[~2013-02-15 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 22:41 Joe Perches [this message]
2013-02-16 20:54 ` tg3 question: Why use misc_host_ctrl not pci_chip_rev_id here? Michael Chan
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=1360968076.21068.28.camel@joe-AO722 \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox