[DNX#2006033142000687] [U-Boot-Users] uninitialized list_head in miiphy r [...]

DENX Support System support at denx.de
Fri Mar 31 23:50:27 CEST 2006

Hello list,

inside the automatic U-Boot patch tracking system a new ticket
[DNX#2006033142000687] was created:

> 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

Your U-Boot support team

More information about the U-Boot mailing list