Re: [PATCH 4/6] USB: gadget: s3c-hsotg: fix protocol stall handling

2013-09-17 Thread Felipe Balbi
On Thu, Sep 12, 2013 at 04:18:50PM +0200, Robert Baldyga wrote:
 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.bald...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---
  drivers/usb/gadget/s3c-hsotg.c |7 +--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
 index dd5524c..c581cd7 100644
 --- a/drivers/usb/gadget/s3c-hsotg.c
 +++ b/drivers/usb/gadget/s3c-hsotg.c
 @@ -1146,6 +1146,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
 @@ -1245,11 +1247,12 @@ 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 by called, so we enqueue setup request here 
 */

s/by/be

-- 
balbi


signature.asc
Description: Digital signature


[PATCH 4/6] USB: gadget: s3c-hsotg: fix protocol stall handling

2013-09-12 Thread Robert Baldyga
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.bald...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
---
 drivers/usb/gadget/s3c-hsotg.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index dd5524c..c581cd7 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -1146,6 +1146,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
@@ -1245,11 +1247,12 @@ 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 by 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.
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html