usb: musb: omap2430: don't loop indefinitely in interrupt.
authorNeilBrown <neilb@suse.de>
Mon, 13 Aug 2012 02:32:58 +0000 (12:32 +1000)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 2 Mar 2013 20:11:57 +0000 (22:11 +0200)
commitda8dbefb91feb721acceed4cd82719bfa5b379bc
tree27a296126c7527877dc6fc31ad47e7677c20b934
parente275fece47d353f645f68d8d67474e95ce72b205
usb: musb: omap2430: don't loop indefinitely in interrupt.

When called during resume_irqs, omap2430_musb_set_vbus() is run with
interrupts disabled,  In that case 'jiffies' never changes so the loop
can loop forever.

So impose a maximum loop count and add an 'mdelay' to ensure we wait
a reasonable amount of time for bit to be cleared.

This fixes a hang on resume.

Signed-of-by: NeilBrown <neilb@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Conflicts:

drivers/usb/musb/omap2430.c
drivers/usb/musb/omap2430.c