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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Aug 2010 08:45:33 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Masayuki Ohtake <masa-korg@....okisemi.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	ML netdev <netdev@...r.kernel.org>,
	Greg Rose <gregory.v.rose@...el.com>,
	Maxime Bizon <mbizon@...ebox.fr>,
	Kristoffer Glembo <kristoffer@...sler.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	John Linn <john.linn@...inx.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	"David S. Miller" <davem@...emloft.net>,
	MeeGo <meego-dev@...go.com>, "Wang, Qi" <qi.wang@...el.com>,
	"Wang, Yong Y" <yong.y.wang@...el.com>,
	Andrew <andrew.chih.howe.khor@...el.com>,
	Intel OTC <joel.clark@...el.com>,
	"Foster, Margie" <margie.foster@...el.com>,
	Toshiharu Okada <okada533@....okisemi.com>,
	Tomoya Morinaga <morinaga526@....okisemi.com>,
	Takahiro Shimizu <shimizu394@....okisemi.com>
Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH


> +/**
> + * pch_gbe_mac_init_rx_addrs - Initialize receive address's
> + * @hw:	Pointer to the HW structure
> + * @mar_count: Receive address registers
> + */
> +void pch_gbe_mac_init_rx_addrs(struct pch_gbe_hw *hw, u16 mar_count)
> +{
> +	u32 i;
> +	PCH_GBE_DEBUG("pch_gbe_mac_init_rx_addrs\n");
> +
> +	/* Setup the receive address */
> +	pch_gbe_mac_mar_set(hw, hw->mac.addr, 0);
> +
> +	/* Zero out the other receive addresses */
> +	for (i = 1; i < mar_count; i++) {
> +		iowrite32(0, &hw->reg->mac_adr[i].high);
> +		iowrite32(0, &hw->reg->mac_adr[i].low);
> +	}
> +	iowrite32(0xFFFE, &hw->reg->ADDR_MASK);
> +	/* wait busy */
> +	while ((ioread32(&hw->reg->ADDR_MASK) & PCH_GBE_BUSY))
> +		;
> +}

Use cpu_relax here to allow other hyper-thread to run.
	/* wait busy */
	while ((ioread32(&hw->reg->ADDR_MASK) & PCH_GBE_BUSY))
		cpu_relax();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ