public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] uninitialized list_head in miiphy routines
@ 2005-11-18  8:54 Matthias Fuchs
  0 siblings, 0 replies; only message in thread
From: Matthias Fuchs @ 2005-11-18  8:54 UTC (permalink / raw)
  To: u-boot

Hi,

I experienced some trouble with the new PHY code on our 4xx boards. The 
code seems to be added on october, 28th.

This is what happens: When our boards wake up for the very first time no 
ethaddr is configured. Therefore no network interface will be available 
(you get the message: 'Net: no ethernet found.'). This will prevent 
miiphy_register() to be called. This function initializes a list with 
all PHYs (mii_devs). When this function is never called before any of 
the miiphy functions is called, these functions will crash during the 
search (list_for_each(...)) for the correct PHY driver.

This happens in our implementation of reset_phy() 
(board/esd/cms700/cms700.c).

I expect the miiphy functions to return with an error when a PHY 
interface is not availble. This will ony work when the mii_devs 
list_head is initilized in any case.

I appended a little patch that introduces miiphy_init() that must be 
called before any miiphy function. The patch is tested on 4xx systems.

Are there any better ways to do it?

Wolfgang, do you accept this patch?

Regards
Matthias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: miiphy_init-051117.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20051118/77dc8659/attachment.txt 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-18  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18  8:54 [U-Boot-Users] uninitialized list_head in miiphy routines Matthias Fuchs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox