From: Wolfgang Denk Date: Thu, 23 Jul 2009 21:29:56 +0200 Subject: [U-Boot] [PATCH] Bugfix: mpc512x_fec MII accesses fail after ethernet transfers In-Reply-To: <4A637B05.4030306@embedded-brains.de> References: <4A633D5A.3060803@embedded-brains.de> <20090719192658.BB751832E416@gemini.denx.de> <4A637B05.4030306@embedded-brains.de> Message-ID: <20090723192956.0F2F1832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Thomas D?rfler, In message <4A637B05.4030306@embedded-brains.de> you wrote: > > But I doubt that (re-)calling mpc512x_fec_init_phy before a MII command > is run is really a good idea. Using the same code for initial init and > repeated init makes sense, but this function in its current > implementation also resets the PHY, which forces a new line negotiation > to occur. IMHO this is NOT needed when we e.g. query the PHY status and > it would even be contraproductive, if we would change some PHY register > settings, because these changes would also be reset. Agreed. > What COULD make sense is to extract the MII speed register setting > operation from mpc512x_fec_init_phy() and move it to the > mpc512x_fec_mii_read/write functions. because this is where it is really > needed. > > Does this make sense to you? Yes, it does. But we should double-check if setting the MII_SPEED register is all that should be (re-) initialized. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall in <1991Nov13.194420.28091@netlabs.com>