Thread (8 messages) 8 messages, 3 authors, 2012-08-14

Re: Infinite looping in omap2430.c USB driver

From: Felipe Balbi <hidden>
Date: 2012-08-09 11:19:32
Also in: lkml

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help