Home
last modified time | relevance | path

Searched hist:c03da38d5d4b28f6ab559c4df8646dbda536b674 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/musb/
H A Dmusb_core.cdiff c03da38d5d4b28f6ab559c4df8646dbda536b674 Mon May 26 07:52:36 CDT 2014 Daniel Mack <zonque@gmail.com> usb: musb: use is_host_active() to distinguish between host and gadget mode

On AM33xx platforms, unplugging a device in the middle of an active
transfer leads to a drop of MUSB_DEVCTL_HM in MUSB_DEVCTL before the
system is informed about a disconnect. This consequently makes the musb
core call the gadget code to handle the interrupt request, which then
crashes the kernel because the relevant pointers haven't been set up
for gadget mode.

To fix this, use is_host_active() rather than (devctl & MUSB_DEVCTL_HM)
in musb_interrupt() and musb_dma_completion() to detect whether the
controller is in host or peripheral mode. This information is provided
by the driver logic and does not rely on register contents.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>