usb: mtu3: clear u1/u2_enable to 0 in mtu3_gadget_reset
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 25 Jul 2017 08:10:23 +0000 (16:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 14:25:55 +0000 (07:25 -0700)
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>
drivers/usb/mtu3/mtu3_gadget.c

index a4ad67cf0c52c11fc96a3529af1d5fb402d447bc..434fca58143c66b0050434971de49b6ef7a4ca0d 100644 (file)
@@ -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;
 }