[U-Boot] [PATCH v1 1/5] usb: net: introduce support for Moschip USB ethernet

Marek Vasut marex at denx.de
Mon Feb 17 14:12:35 CET 2014


On Monday, February 17, 2014 at 10:40:41 AM, Gerhard Sittig wrote:
[...]

> > Why don't you just use structure with padding as the rest of the U-Boot
> > does ? Like so:
> > 
> > struct regs {
> > 
> >  u8 reg1;
> >  u8 pad1[n];
> >  u8 reg2;
> > 
> > ...
> > };
> 
> does not apply here -- these are "adapter registers behind USB",
> very much like "PHY registers behind MII communication"; the
> driver won't pass addresses to I/O accessors, but will pass
> register numbers as parameters to USB API calls

You'd be passing offset of the register in the structure, right ?

[...]

> > Uh, this code is not quite clear to me ... can you not simplify this
> > weird loop? [...]
> 
> again, this was copied from asix; its core is checking for the
> ethernet link status, what makes it look so weird is the "nice"
> user presentation of whether the link already was established or
> needed to get established first -- will see how I can rephrase it
> 
> thank you for reviewing!

Thanks

Best regards,
Marek Vasut


More information about the U-Boot mailing list