MLK-22527-1 usb: cdns3: gadget: quit functional halt if there are pending requests
authorPeter Chen <peter.chen@nxp.com>
Mon, 9 Sep 2019 06:37:34 +0000 (14:37 +0800)
committerPeter Chen <peter.chen@nxp.com>
Tue, 10 Sep 2019 08:58:48 +0000 (16:58 +0800)
commitbca66d3f0887d320d1e970dac7f825a58e5801b2
tree8f9a1bd83cf200f61fe2b2660ff80e2fcee9c940
parent85da3d0d46f6868ed5821e1a1bdd90d359efa2f6
MLK-22527-1 usb: cdns3: gadget: quit functional halt if there are pending requests

If the non-control endpoints want to halt, but there are pending
requests on this endpoint, we need to return -EAGAIN, otherwise,
the controller may be in stuck if we stall the doolbell'ed
endpoint.

With this change, we could pass the USB certification MSC test.

Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/cdns3/gadget.c