Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: function: acm: return zlp for OUT setup
@ 2015-10-14 14:56 jaswinder.singh
  2015-10-14 15:12 ` Felipe Balbi
  0 siblings, 1 reply; 15+ messages in thread
From: jaswinder.singh @ 2015-10-14 14:56 UTC (permalink / raw)
  To: linux-usb; +Cc: balbi, stable, Jassi Brar

From: Jassi Brar <jaswinder.singh@linaro.org>

We must return 0 for any OUT setup request, otherwise
protocol error may occur.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
 drivers/usb/gadget/function/f_acm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c
index aad8165..14d9e28 100644
--- a/drivers/usb/gadget/function/f_acm.c
+++ b/drivers/usb/gadget/function/f_acm.c
@@ -364,7 +364,7 @@ static int acm_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
 				|| w_index != acm->ctrl_id)
 			goto invalid;
 
-		value = w_length;
+		value = 0;
 		cdev->gadget->ep0->driver_data = acm;
 		req->complete = acm_complete_set_line_coding;
 		break;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-15 19:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 14:56 [PATCH] usb: gadget: function: acm: return zlp for OUT setup jaswinder.singh
2015-10-14 15:12 ` Felipe Balbi
2015-10-14 15:33   ` Jassi Brar
2015-10-14 15:48     ` Felipe Balbi
2015-10-14 16:43       ` Jassi Brar
2015-10-14 17:10         ` Felipe Balbi
2015-10-15  3:27           ` Jassi Brar
2015-10-15 19:18             ` Felipe Balbi
2015-10-14 17:48         ` Alan Stern
2015-10-14 18:32           ` Felipe Balbi
2015-10-14 19:32             ` Alan Stern
2015-10-15  3:38           ` Jassi Brar
2015-10-15 14:29             ` Alan Stern
2015-10-15 14:51               ` Jassi Brar
2015-10-15 16:55                 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox