Wolfgang & Ilya, Sorry for responding to both of you at the same time...
On 6/22/2010 11:14 AM, Wolfgang Denk wrote: > Dear Ilya Yanok, > > In message<4c1f5a54.4050...@emcraft.com> you wrote: > >> >>> Entry to MAINTAINERS missing. >>> >> Should I add you as a maintainer or myself? >> > You did the actual work... > > >>>> +int board_eth_init(bd_t *bis) >>>> +{ >>>> + cpu_eth_init(bis); /* Initialize TSECs first */ >>>> >>>> >>> I think it's wrong to ignore the return code here. >>> >> What makes you think so? What can we do with the return code here? Print >> warning? If we return error from board_eth_init() calling code will call >> cpu_eth_init() again which is useless as we have already called it. >> > Yes, print a warning if < 0. As you've noticed, returning -1 wouldn't be good. I'm not aware of a U-boot policy for handling hardware problems other than printf. >>>> + return pci_eth_init(bis); >>>> > My understanding is that pci_eth_init() and board_eth_init() return > the number of NIC's found - should that number not include the number > of successfully initialized TSECs? > > Yes, please. Something like: int board_eth_init(bd_t *bis) { int rc, num_if = 0; if ((rc = cpu_eth_init(bis)) >= 0) { num_if += rc; } else { print error message } if ((rc = pci_eth_init(bis)) >= 0) { num_if += rc; } else { print error message } return num_if; } I'm working on changing net/eth.c to be less kludgy, but am having a hard time setting up my test bed. Hopefully in the next few days. > Best regards, > > Wolfgang Denk > > regards, Ben _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot