usb: mtu3: handle delayed status of the control transfer
commitfe7c994a5ed8e3bd50888ef4391da9bb28934bd7
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 25 Jul 2017 08:10:22 +0000 (25 16:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 14:25:55 +0000 (30 07:25 -0700)
tree7272e6a7b0ccbf09dd883eeae7a202e4145ae4e6
parent141769851cb73e8f986e9ed83129cde3b645288d
usb: mtu3: handle delayed status of the control transfer

Add the delayed status handling. This is used by mass storage etc to
gain some extra time to setup its internal status before it can proceed
further requests, and once the gadget is ready, it will enqueue an
empty packet which is used for synchronization.
The issue may happen on some FGPA platform with very low cpu frequency.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3.h
drivers/usb/mtu3/mtu3_gadget.c
drivers/usb/mtu3/mtu3_gadget_ep0.c