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>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Feb 2013 14:41:16 -0800
From:	Joe Perches <joe@...ches.com>
To:	netdev <netdev@...r.kernel.org>
Cc:	Jeff Garzik <jeff@...zik.org>, David Miller <davem@...emloft.net>,
	Matt Carlson <mcarlson@...adcom.com>,
	Michael Chan <mchan@...adcom.com>
Subject: tg3 question: Why use misc_host_ctrl not pci_chip_rev_id here?

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.


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ