summaryrefslogtreecommitdiffstats
path: root/drivers/usb/mtu3
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2017-07-25 10:10:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-30 16:25:55 +0200
commit14a4caa03ba53e66a500e36bf618dbf013cbab9d (patch)
tree3dc5e47f1855cd0a453dd3f1f85ba1863e129c35 /drivers/usb/mtu3
parentusb: mtu3: handle delayed status of the control transfer (diff)
downloadlinux-14a4caa03ba53e66a500e36bf618dbf013cbab9d.tar.xz
linux-14a4caa03ba53e66a500e36bf618dbf013cbab9d.zip
usb: mtu3: clear u1/u2_enable to 0 in mtu3_gadget_reset
when the device is reset by host, the status of u1_enable and u2_enable should also be restored to default value. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3')
-rw-r--r--drivers/usb/mtu3/mtu3_gadget.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
index a4ad67cf0c52..434fca58143c 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
@@ -728,5 +728,7 @@ void mtu3_gadget_reset(struct mtu3 *mtu)
mtu->address = 0;
mtu->ep0_state = MU3D_EP0_STATE_SETUP;
mtu->may_wakeup = 0;
+ mtu->u1_enable = 0;
+ mtu->u2_enable = 0;
mtu->delayed_status = false;
}