usb: cdns3: gadget: move wait configuration operation
authorPeter Chen <peter.chen@nxp.com>
Tue, 1 Sep 2020 02:33:52 +0000 (10:33 +0800)
committerFelipe Balbi <balbi@kernel.org>
Fri, 2 Oct 2020 06:57:40 +0000 (09:57 +0300)
commitb21cf9371c2e659dbd0b7099b936b67f424fb555
tree9814d11b1f539e38d0e7a1527a9d69e3764785a3
parent9f650135945fb5dba6bd6340ce834570fe0686f2
usb: cdns3: gadget: move wait configuration operation

After commit f4cfe5ce607d ("usb: cdns3: gadget: improve the
set_configuration handling"), the software will inform the
hardware the request has finished at cdns3_ep0_complete_setup.
The configuration set bit is only set after request has finished,
so it needs to move waiting operation after that. Meanwhile,
if it is timeout, it will show warning message and return error.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/cdns3/ep0.c
drivers/usb/cdns3/gadget.c