1
0
Fork 0

usb: mtu3: avoid sleep in atomic context when enter test mode

Use readl_poll_timeout_atomic() instead of readl_poll_timeout()
in atomic context

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Chunfeng Yun 2018-05-23 16:53:18 +08:00 committed by Greg Kroah-Hartman
parent fbe9db75b4
commit 3d7678e2a0
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ static int handle_test_mode(struct mtu3 *mtu, struct usb_ctrlrequest *setup)
mtu3_writel(mbase, U3D_EP0CSR, value | EP0_SETUPPKTRDY | EP0_DATAEND);
/* wait for ACK status sent by host */
readl_poll_timeout(mbase + U3D_EP0CSR, value,
readl_poll_timeout_atomic(mbase + U3D_EP0CSR, value,
!(value & EP0_DATAEND), 100, 5000);
mtu3_writel(mbase, U3D_USB2_TEST_MODE, mtu->test_mode_nr);