From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Thomas_D=F6rfler?= Date: Sun, 19 Jul 2009 19:51:27 +0200 Subject: [U-Boot] [PATCH] Bugfix: mpc512x_fec MII accesses fail after ethernet transfers In-Reply-To: <20090719172209.83C95832E416@gemini.denx.de> References: <4A633D5A.3060803@embedded-brains.de> <20090719172209.83C95832E416@gemini.denx.de> Message-ID: <4A635D1F.9030402@embedded-brains.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, on our custom MPC5121 board I used the following sequence to see the bug: - After U-Boot stated, I could inspect the status of the PHY with "mii info". This works fine even if repeated. - then I trigger some network activity, for example with "ping" - if I try to get the PHY status with "mii info" AFTER that network activity, the command fails (it does not even detect, that a PHY is connected). The reason I could track down is, that: - the FEC driver performs a FEC reset before the initial packet is transmitted - this reset also clears the MII speed register, which defines the communication speed on MDC/MDIO - the PHY access works again, when the MII speed register is set to its proper value. I have tested this behaviour on a old (M34K) mask, but I am sure it applies also to the current M36P. wkr, Thomas Doerfler. Wolfgang Denk wrote: > Dear =?ISO-8859-15?Q?Thomas_D=F6rfler?=, > > In message <4A633D5A.3060803@embedded-brains.de> you wrote: >> The mpc512x FEC network driver resets the FEC before transferring >> packets. With this reset, the FEC clears the previous setting of MII >> transfer speed. This patch ensures, that it is set again to a reasonable >> value after a FEC reset. > > Hmmm... what is the exact effect of the bug you are trying to fix > here? Do you have any example how to trigger erroneous behaviour? > > Best regards, > > Wolfgang Denk > -- -------------------------------------------- Embedded Brains GmbH Thomas Doerfler Obere Lagerstrasse 30 D-82178 Puchheim Germany email: Thomas.Doerfler at embedded-brains.de Phone: +49-89-18908079-2 Fax: +49-89-18908079-9