diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2018-05-23 11:53:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-24 19:09:37 +0300 |
commit | 3d7678e2a02aa99de6c4ac090e1d8fcfbd023e34 (patch) | |
tree | 301037c911ead0d4a815de64d39a1ac46c159837 | |
parent | fbe9db75b4941b1c52f37a9a3916971612793b0a (diff) | |
download | linux-3d7678e2a02aa99de6c4ac090e1d8fcfbd023e34.tar.xz |
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>
-rw-r--r-- | drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index 0d2b1cf1d5ea..25216e79cd6e 100644 --- a/drivers/usb/mtu3/mtu3_gadget_ep0.c +++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c @@ -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); |