summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAmelie Delaunay <amelie.delaunay@foss.st.com>2021-10-05 11:53:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-21 12:49:00 +0200
commitb2cab2a24fb5d13ce1d384ecfb6de827fa08a048 (patch)
tree08db7dfaed1192d26cf014a9673e49fff21f815c /mm
parent20f588ac9841edaf3e03fb24afe43ee530622a3c (diff)
usb: dwc2: drd: fix dwc2_force_mode call in dwc2_ovr_init
Instead of forcing the role to Device, check the dr_mode configuration. If the core is Host only, force the mode to Host, this to avoid the dwc2_force_mode warning: WARNING: CPU: 1 PID: 21 at drivers/usb/dwc2/core.c:615 dwc2_drd_init+0x104/0x17c When forcing mode to Host, dwc2_force_mode may sleep the time the host role is applied. To avoid sleeping while atomic context, move the call to dwc2_force_mode after spin_unlock_irqrestore. It is safe, as interrupts are not yet unmasked here. Fixes: 17f934024e84 ("usb: dwc2: override PHY input signals with usb role switch support") Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20211005095305.66397-2-amelie.delaunay@foss.st.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions