[U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot

Mike Frysinger
2011-03-01T08:48:15Z

On Tuesday, March 01, 2011 03:34:38 Michal Simek wrote:
> Mike Frysinger wrote:
> > On Tuesday, March 01, 2011 03:00:47 Michal Simek wrote:
> >> If both functions should return 0 then any code should check it and all
> >> others drivers should be fixed.
> >
> > i agree, but that doesnt mean new code should knowingly be left broken
>
> I agree that make no sense do not fix it right now.

err, your new driver should return the correct values. what higher levels do
or do not check does not matter, and whether other drivers do it correctly
does not matter.

> >> ep93xx_eth.c returns also 1.
> >> Anyway if is number of registered devices, "1" should means one
> >> registered device. If zero means one registered device then please
> >> point me to that documentation.
> >
> > the change hasnt been ported to all drivers yet. but new drivers should
> > be doing it as i described.
>
> How does it look like phy lib u-boot support?

i dont know what you mean ... how is phylib relevant to this ? or are you
just asking in general ?

> > also, you should change the "hang()" to "return 0" in the init func.
>
> Are you sure return 0 which should mean success. Anything different from 0
> seems to me relevant.

as i said, the initialize function is not returning "success" or "failure".
it is returning "# of devices registered". if you cannot register any, you
should return 0. having the boot process fail because of network issues
doesnt make much sense when u-boot can do quite a lot without the network.
including updating itself via other means.

> I maintain emaclite driver and none tell me this that's why the process is
> so slow. I believe if you release that documentation, which you are
> talking about, then others will clean/test their drivers.

the behavior i describe isnt a decision i made. it was made by the previous
net maintainer and agreed upon by others in the discussion.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110301/5c643037/attachment.pgp