[PATCH] 44x ethernet MDIO access

Ralph Siemsen rsiemsen at rossvideo.com
Fri Aug 6 05:01:39 EST 2004


There is a small bug in the emac_phy_write() routine defined in
drivers/net/ibm_emac/ibm_emac_core.c (present in latest 2.6.8-rc3).  At
the end of the function, check is done for phy error; however as written
this will always be false, because "stacr" contains the value _written_
to the hardware, rather than the value read back from hardware.

Simple on-line fix attached.

In a related issue, both the PHY read and write functions use a fixed
time delay (MDIO_DELAY = 50) presently... it seems I need a longer value
on my hardware, and having such hardcoded values is trouble anyways... I
suggest we change the code to poll for completion, with a short delay
and an upper limit on the number of loops.

=Ralph
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mdio_write.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20040805/8f8d64e7/attachment.asc>


More information about the Linuxppc-dev mailing list