]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: do not sleep in atomic context
authorDaniel Mack <zonque@gmail.com>
Wed, 15 Jan 2014 13:09:49 +0000 (14:09 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 18 Feb 2014 16:34:07 +0000 (10:34 -0600)
commit92a24240473152dd06f008dd905120145c2ae60e
tree6c1e85c58e1d8de250f89ff9511dea6ee308fcef
parent3467d2a1c23b2d26e3d86954be3550506f2cf61e
usb: musb: do not sleep in atomic context

musb_port_reset() is called from musb_hub_control() which in turn holds
a spinlock, so musb_port_reset() is not allowed to call msleep().

With the asynchronous work helpers in place, this is fortunately easy to
fix by rescheduling the reset deassertion function to after the time
when the wait period is finished.

Note, however, that the MUSB_POWER_RESUME bit is only set on AM33xx
processors under rare conditions such as when to another driver
reporting an error during suspend. Hence, this didn't hit me yet in
normal operation.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_virthub.c