提交 ab93e014 编写于 作者: R Robert Baldyga 提交者: Felipe Balbi

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: NRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 b8798636
...@@ -1164,6 +1164,8 @@ static int s3c_hsotg_process_req_feature(struct s3c_hsotg *hsotg, ...@@ -1164,6 +1164,8 @@ static int s3c_hsotg_process_req_feature(struct s3c_hsotg *hsotg,
return 1; return 1;
} }
static void s3c_hsotg_enqueue_setup(struct s3c_hsotg *hsotg);
/** /**
* s3c_hsotg_process_control - process a control request * s3c_hsotg_process_control - process a control request
* @hsotg: The device state * @hsotg: The device state
...@@ -1263,11 +1265,15 @@ static void s3c_hsotg_process_control(struct s3c_hsotg *hsotg, ...@@ -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 * don't believe we need to anything more to get the EP
* to reply with a STALL packet * 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 * s3c_hsotg_complete_setup - completion of a setup transfer
* @ep: The endpoint the request was on. * @ep: The endpoint the request was on.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册