usb: dwc3: ep0: simplify EP0 state machine
authorFelipe Balbi <balbi@ti.com>
Sat, 27 Aug 2011 19:28:36 +0000 (22:28 +0300)
committerFelipe Balbi <balbi@ti.com>
Fri, 9 Sep 2011 10:02:07 +0000 (13:02 +0300)
commitc7fcdeb2627c46b7ec3f0bcb2054b10405f9a70e
treee773414177e516a4e7dfad6bfe03f7e46a7388ea
parent984f66a6f9b9c02d6cb077ac49ec9fe5445fb1ee
usb: dwc3: ep0: simplify EP0 state machine

The DesignWare USB3 core tells us which phase
of a control transfer should be started, it
also tells us which physical endpoint needs
that transfer.

With these two informations, we have all we
need to simply EP0 handling quite a lot and
get rid rid of the SW state machine tracking
ep0 states.

For achieving this perfectly, we needed to
add support for situations where we get
XferNotReady while endpoint is still busy
and XferNotReady while gadget driver still
hasn't queued a request.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c