From: Rodolfo Giometti Date: Tue, 6 Mar 2007 12:02:21 +0100 Subject: [U-Boot-Users] [PATCH] Delays for crappy USB keys In-Reply-To: <20070306105655.97895352B84@atlas.denx.de> References: <20070306101800.GA7521@gundam.enneenne.com> <20070306105655.97895352B84@atlas.denx.de> Message-ID: <20070306110220.GF6726@gundam.enneenne.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Mar 06, 2007 at 11:56:55AM +0100, Wolfgang Denk wrote: > In message <20070306101800.GA7521@gundam.enneenne.com> you wrote: > > > > I noticed that using this patch: > > > > diff --git a/common/usb.c b/common/usb.c > > index 0857494..087a65f 100644 > > --- a/common/usb.c > > +++ b/common/usb.c > > @@ -61,7 +61,7 @@ #undef USB_DEBUG > > #ifdef USB_DEBUG > > #define USB_PRINTF(fmt,args...) printf (fmt ,##args) > > #else > > -#define USB_PRINTF(fmt,args...) > > +#define USB_PRINTF(fmt,args...) wait_ms(1) /* for crappy USB keys... */ > > #endif > > > > allows crappy USB keys to work well. :) > > Ummm.. I guess I don't have to tell you that this is just a pretty > dirty hack; can you please try to find out where exactly the delay > should be added to the code? You are right but after putting some delays around the code I preferred to use this ??dirty hack! :) However as soon as I have more free time I'll try to find out where exactly I should add the delay. Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127