From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Jens Osterkamp To: Linas Vepstas Subject: Re: spidernet: add improved phy support in sungem_phy.c Date: Thu, 1 Feb 2007 11:55:48 +0100 References: <200701261407.48237.jens@de.ibm.com> <20070126233809.GA16660@electric-eye.fr.zoreil.com> <20070130223050.GE5616@austin.ibm.com> In-Reply-To: <20070130223050.GE5616@austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200702011155.48664.jens@de.ibm.com> Cc: Francois Romieu , James K Lewis , linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, jgarzik@pobox.com, cbe-oss-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tuesday 30 January 2007 11:30 pm, Linas Vepstas wrote: > Shifting to the right by 5 bits has no effect on the result > of this conditional. Either the bit is set, or its not. > There is no need to shift. > > > + if ( (phy_reg & 0x0020) >> 7 ) { You are right, I corrected this. > The result here will always be zero, since the bit, > if set, will be shifted off the end. Bits on the lef > are padded with zero. Ergo, this is a bug. You are right, wrong bit. I corrected this. Jens