Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754152Ab0HZPpi (ORCPT ); Thu, 26 Aug 2010 11:45:38 -0400 Received: from mail.vyatta.com ([76.74.103.46]:46331 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309Ab0HZPpg (ORCPT ); Thu, 26 Aug 2010 11:45:36 -0400 Date: Thu, 26 Aug 2010 08:45:33 -0700 From: Stephen Hemminger To: Masayuki Ohtake Cc: LKML , ML netdev , Greg Rose , Maxime Bizon , Kristoffer Glembo , Ralf Baechle , John Linn , Randy Dunlap , "David S. Miller" , MeeGo , "Wang, Qi" , "Wang, Yong Y" , Andrew , Intel OTC , "Foster, Margie" , Toshiharu Okada , Tomoya Morinaga , Takahiro Shimizu Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH Message-ID: <20100826084533.1dfbd9bf@nehalam> In-Reply-To: <4C763A67.5040107@dsn.okisemi.com> References: <4C763A67.5040107@dsn.okisemi.com> Organization: Vyatta X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 34 > +/** > + * 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/