From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Kocialkowski Date: Sun, 29 Mar 2015 12:30:00 +0200 Subject: [U-Boot] [PATCH] usb: Early failure when the first descriptor read fails, one way or another In-Reply-To: <1427563902.8267.12.camel@collins> References: <1427563438-25427-1-git-send-email-contact@paulk.fr> <201503281826.20603.marex@denx.de> <1427563902.8267.12.camel@collins> Message-ID: <1427625000.2326.0.camel@aldrin> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > > @@ -990,6 +990,9 @@ int usb_new_device(struct usb_device *dev) > > > case 64: > > > dev->maxpacketsize = PACKET_SIZE_64; > > > break; > > > + default: > > > + debug("usb_new_device: invalid max packet size\n"); > > > > 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). Plugging an USB1 device on a controller that > doesn't support USB1 should normally fail, this is not some kind of > run-time error. > > When this happens in Linux, it just fails (silently) and tries ohci > instead. I'm afraid there is no such mechanism in U-Boot, so the best we > can do is to treat the device as unsupported. > > If you're not convinced by this, I can still make a v2 with printf, I > just don't think it's a necessity. Nervermind this, I have sent out a v2 addressing you concern. > > Thanks! > > > > > + return 1; > > > } > > > dev->devnum = addr; -- Paul Kocialkowski, Replicant developer Replicant is a fully free Android distribution running on several devices, a free software mobile operating system putting the emphasis on freedom and privacy/security. Website: http://www.replicant.us/ Blog: http://blog.replicant.us/ Wiki/tracker/forums: http://redmine.replicant.us/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: