[PATCH] MPC85XX TSEC driver: fix for mdio speed

Andy Fleming afleming at freescale.com
Wed Jul 14 12:06:17 EST 2004


> From: Stefan Nickl<Stefan.Nickl at kontron.com>
> Date: June 29, 2004 5:17:44 AM CDT
> To: linuxppc-embedded<linuxppc-embedded at lists.linuxppc.org>
> Cc: Kumar Gala<kumar.gala at motorola.com>
> Subject: [PATCH] MPC85XX TSEC driver: fix for mdio speed
>
> In gianfar_phy.c, the divisor for the MDIO interface to the PHYs
> is set to a safe value as part of running a phy_cmd.
> However, there is one MDIO transaction that happens before any command
> is sent: reading the PHYs manufactuere identifier in get_phy_info.
> This patch adds a "dummy command" to use the side effect of
> phy_run_commands.
> Background is that the initial revision of our hardware only works
> reliably with the slowest divisor as long as the FEC PHY is the only
> (MDIO) bus load. We kept reading slightly distorted ID from the FEC's
> PHY when the 2 Marvells were not yet up.
> --
> Stefan Nickl
> Kontron Modular Computers
>

Ooh, good catch.  Kumar Gala forwarded me this, since I wrote the
driver (And now I have subscribed to linuxppc-embedded, as I should
have ;).  Rather than a dummy read, though, it might be better to
abstract the code which configures the bus, and put it in a function
that both get_phy_info and phy_run_commands can call.

Here's a patch that does that.  Could you check that it fixes your
problem?  If so, we'll push it out.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: phy_buspatch.txt
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20040713/b5bb04f0/attachment.txt 
-------------- next part --------------


Sorry for the long delay:  this window fell behind some others while I
was investigating a couple of the other things you mentioned, and then
my stack got corrupted.

Andy Fleming
PowerPC Software Enablement
Freescale Semiconductor, Inc.


More information about the Linuxppc-embedded mailing list