]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: musb: do not sleep in atomic context
authorDaniel Mack <zonque@gmail.com>
Fri, 14 Feb 2014 19:49:46 +0000 (20:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 20:08:15 +0000 (12:08 -0800)
commit73926db33b277c4c371edbc9fe9093adc9b2803b
treed07829e0d191fa95840f62a0ffb2e1f18753e34e
parent12df84d4a80278a5b1abfec3206795291da52fc9
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_virthub.c