usb: dwc2: fix call to vbus supply exit routine, call it unlocked
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 5 Sep 2018 11:40:04 +0000 (13:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:34 +0000 (11:08 -0800)
commit44e130f9779895ecce77b7ccfc4a6ef1dc734ac0
tree865e008ba579d00e3de01ea8b361734bca4150ef
parent106d970ba5c84b6c61a706f9b13ff0d336500d31
usb: dwc2: fix call to vbus supply exit routine, call it unlocked

[ Upstream commit 5aa678c7fd5371769efde30763fb43a43a118cd0 ]

dwc2_vbus_supply_exit() may call regulator_disable(). It shouldn't be
called with interrupts disabled as it might sleep.
This is seen with DEBUG_ATOMIC_SLEEP=y.

Fixes: 531ef5ebea96 ("usb: dwc2: add support for host mode external
vbus supply")

Tested-by: Artur Petrosyan <arturp@synopsys.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/hcd.c