Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: dwc2: drd: fix sleeping while spinlock atomic context
If GINTSTS.CURMODE is not yet reflecting the expecting mode after calling dwc2_force_mode, we enter in the dwc2_wait_for_mode function while under spinlock atomic context. To avoid this situation, move the call to dwc2_force_mode after the spinlock atomic context. Change-Id: If30c9bf19249be8c5d07e229f4067e6d013092cb Fixes: 5ec811a6ab7b ("usb: dwc2: add DRD support with role switch and override Vbus/ID signals") Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/173585 Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by: Fabrice GASNIER <fabrice.gasnier@st.com>
- Loading branch information