diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-05-29 14:53:02 -0600 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-06-01 19:22:40 +0200 |
commit | a2d8f929857b7bc50528114c29e48a99cbcee1f1 (patch) | |
tree | 73efb517d9edb37c45ee59aff6e81326038158b4 /drivers/usb/gadget/ci_udc.h | |
parent | 054731b09e1944cdb130b755ac0f6c188920e98a (diff) |
usb: ci_udc: pre-allocate ep0 req
Allocate ep0's USB request object when the UDC driver is probed. This
solves a couple of issues in the current code:
a) A request object always exists for ep0. Prior to this patch, if setup
transactions arrived in an unexpected order, handle_setup() would need
to reply to a setup transaction before any ep0 usb_req was created.
This issue was introduced in commit 2813006fecda "usb: ci_udc: allow
multiple buffer allocs per ep."
b) handle_ep_complete no longer /has/ to queue the ep0 request again
after every single request completion. This is currently required, since
handle_setup() assumes it can find some request object in ep0's request
queue. This patch doesn't actually stop handle_ep_complete() from always
requeueing the request, but the next patch will.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/usb/gadget/ci_udc.h')
-rw-r--r-- | drivers/usb/gadget/ci_udc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci_udc.h b/drivers/usb/gadget/ci_udc.h index 23cff56d7e..7d76af84f0 100644 --- a/drivers/usb/gadget/ci_udc.h +++ b/drivers/usb/gadget/ci_udc.h @@ -97,6 +97,7 @@ struct ci_ep { struct ci_drv { struct usb_gadget gadget; + struct ci_req *ep0_req; struct usb_gadget_driver *driver; struct ehci_ctrl *ctrl; struct ept_queue_head *epts; |