[U-Boot] [PATCH] usb: Early failure when the first descriptor read fails, one way or another

Marek Vasut marex at denx.de
Fri Apr 3 04:01:35 CEST 2015


On Monday, March 30, 2015 at 03:35:03 PM, Paul Kocialkowski wrote:
> Le lundi 30 mars 2015 à 01:47 +0200, Marek Vasut a écrit :

[...]

> > > > Hi,
> > > > 
> > > > since this is an error, this should probably be a printf(). Also,
> > > > to make the error message useful, it should state the invalid value
> > > > due to which it failed.
> > > 
> > > Well, it is not unexpected behaviour in my use case (but I reckon it
> > > may be generally speaking).
> > 
> > Why is this not unexpected in your case please ?
> 
> Because using an USB low speed device with an EHCI controller should
> normally fail (that is, the first descriptor read returns 0 bytes), or
> at least it does on the sunxi platforms. I thought there was no need to
> report that as an error, but I changed my mind.

Indeed.

> Since the end result is that the USB device won't work, I think it makes
> sense to print an error.

Yes, I agree.

> > > If you're not convinced by this, I can still make a v2 with printf, I
> > > just don't think it's a necessity.
> > 
> > Let me just understand what you're seeing a bit better first please .
> 
> At this point, v2 of this patch was sent as: usb: Early failure when the
> first descriptor read fails or is invalid
> 
> Let me know if you need some more context on this.

This is OK, thank you for clarifying !

Best regards,
Marek Vasut


More information about the U-Boot mailing list