]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: ensure in peripheral mode when checking session
authorBin Liu <b-liu@ti.com>
Mon, 14 Sep 2015 14:12:34 +0000 (09:12 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 14 Sep 2015 15:14:48 +0000 (10:14 -0500)
commit313b8c962e215947bdb3883c179ffe2932254d84
tree60ee28428201c16fb18e6acd17d808ac1476795c
parente6c26428a78e05d109cc637b12a1d418a44f937f
usb: musb: ensure in peripheral mode when checking session

The change ensures otg is not in a A- state when checking for VBUS in
peripheral mode.

musb_start() where VBUS checking is in can be called in many situations.
One example is in babble recovery routine, in which otg is transitioning
from A-HOST to A-WAIT-BCON, but VBUS discharge takes time, so
musb->is_active could be set to 1 due to this improper checking, then it
causes musb_bus_suspend() failed which leads to warning log message
flooding.

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c