Commit 36616224 authored by Neil Zhang's avatar Neil Zhang Committed by Felipe Balbi

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: default avatarNeil Zhang <zhangwm@marvell.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 0c70840b
...@@ -1343,6 +1343,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty) ...@@ -1343,6 +1343,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty)
ep = &udc->eps[0]; ep = &udc->eps[0];
udc->ep0_dir = direction; udc->ep0_dir = direction;
udc->ep0_state = WAIT_FOR_OUT_STATUS;
req = udc->status_req; req = udc->status_req;
...@@ -1421,6 +1422,8 @@ static void ch9getstatus(struct mv_udc *udc, u8 ep_num, ...@@ -1421,6 +1422,8 @@ static void ch9getstatus(struct mv_udc *udc, u8 ep_num,
retval = udc_prime_status(udc, EP_DIR_IN, status, false); retval = udc_prime_status(udc, EP_DIR_IN, status, false);
if (retval) if (retval)
ep0_stall(udc); ep0_stall(udc);
else
udc->ep0_state = DATA_STATE_XMIT;
} }
static void ch9clearfeature(struct mv_udc *udc, struct usb_ctrlrequest *setup) 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) ...@@ -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)) if (udc_prime_status(udc, EP_DIR_IN, 0, true))
ep0_stall(udc); ep0_stall(udc);
else
udc->ep0_state = DATA_STATE_XMIT;
out: out:
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment