lkml.org 
[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Infinite looping in omap2430.c USB driver
On Sat, Jul 07, 2012 at 08:39:49AM +1000, NeilBrown wrote:
>
> Hello `./scripts/get_maintainer.pl -f drivers/usb/musb/omap2430.c`
>
> omap2430_musb_set_vbus in omap2430.c contains:
>
> while (musb_readb(musb->mregs, MUSB_DEVCTL) & 0x80) {
>
> cpu_relax();
>
> if (time_after(jiffies, timeout)) {
> dev_err(musb->controller,
> "configured as A device timeout");
> ret = -EINVAL;
> break;
> }
> }
>
> having set
> unsigned long timeout = jiffies + msecs_to_jiffies(1000);

hehe, that's nasty. Please send a patch converting to a try count and a
udelay_range(), or something.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-08-09 14:02    [W:0.103 / U:4.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site