diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2013-09-19 11:50:17 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-15 08:42:40 -0500 |
commit | ab93e014f35374a8169b0f465fccee69e04ea34c (patch) | |
tree | b083f58b6695f417810b9ed3f4ef4592b4054a01 /drivers/usb/gadget | |
parent | b8798636798ee04feb0f1bb87eec0027e3f68d98 (diff) |
usb: gadget: s3c-hsotg: fix "protocol stall" handling
After normal handling of SetupDone interrupt, XferCompl interrupt occurs, and
then we enqueue new setup request. But when ep0 is stalled, there is no
XferCompl, so we have to enqueue setup request immediately after stalling ep.
Otherwise incoming control requests won't be processed correctly.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 93f786669dd..4faf5e70e09 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -1164,6 +1164,8 @@ static int s3c_hsotg_process_req_feature(struct s3c_hsotg *hsotg, return 1; } +static void s3c_hsotg_enqueue_setup(struct s3c_hsotg *hsotg); + /** * s3c_hsotg_process_control - process a control request * @hsotg: The device state @@ -1263,11 +1265,15 @@ static void s3c_hsotg_process_control(struct s3c_hsotg *hsotg, * don't believe we need to anything more to get the EP * to reply with a STALL packet */ + + /* + * complete won't be called, so we enqueue + * setup request here + */ + s3c_hsotg_enqueue_setup(hsotg); } } -static void s3c_hsotg_enqueue_setup(struct s3c_hsotg *hsotg); - /** * s3c_hsotg_complete_setup - completion of a setup transfer * @ep: The endpoint the request was on. |