diff options
author | Neil Zhang <zhangwm@marvell.com> | 2011-10-12 12:49:34 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 21:42:05 +0400 |
commit | 366162245e619d59c9d615774ab3aa639deb7725 (patch) | |
tree | 536c1514056b8be2ba51d6141aabd7ee8b40b034 /drivers/usb | |
parent | 0c70840b22d9f3b762f21a28bface1a42c0c5ba2 (diff) | |
download | linux-366162245e619d59c9d615774ab3aa639deb7725.tar.xz |
usb: gadget: mv_udc: correct ep0 state
This patch is going to correct the ep0 state, and the unexpected
ep0 package warning can be removed.
Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/mv_udc_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 843a479fa25c..f8dc5b3dd796 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -1343,6 +1343,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty) ep = &udc->eps[0]; udc->ep0_dir = direction; + udc->ep0_state = WAIT_FOR_OUT_STATUS; req = udc->status_req; @@ -1421,6 +1422,8 @@ static void ch9getstatus(struct mv_udc *udc, u8 ep_num, retval = udc_prime_status(udc, EP_DIR_IN, status, false); if (retval) ep0_stall(udc); + else + udc->ep0_state = DATA_STATE_XMIT; } static void ch9clearfeature(struct mv_udc *udc, struct usb_ctrlrequest *setup) @@ -1466,8 +1469,6 @@ static void ch9clearfeature(struct mv_udc *udc, struct usb_ctrlrequest *setup) if (udc_prime_status(udc, EP_DIR_IN, 0, true)) ep0_stall(udc); - else - udc->ep0_state = DATA_STATE_XMIT; out: return; } |