From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 3 Apr 2015 04:01:35 +0200 Subject: [U-Boot] [PATCH] usb: Early failure when the first descriptor read fails, one way or another In-Reply-To: <1427722503.2521.9.camel@collins> References: <1427563438-25427-1-git-send-email-contact@paulk.fr> <201503300147.57183.marex@denx.de> <1427722503.2521.9.camel@collins> Message-ID: <201504030401.35150.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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