1 From 2bac51a1827a18821150ed8c9f9752c02f9c2b02 Mon Sep 17 00:00:00 2001
2 From: Michael Grzeschik <m.grzeschik@pengutronix.de>
3 Date: Mon, 11 Nov 2013 23:43:32 +0100
4 Subject: usb: gadget: composite: reset delayed_status on reset_config
6 From: Michael Grzeschik <m.grzeschik@pengutronix.de>
8 commit 2bac51a1827a18821150ed8c9f9752c02f9c2b02 upstream.
10 The delayed_status value is used to keep track of status response
11 packets on ep0. It needs to be reset or the set_config function would
12 still delay the answer, if the usb device got unplugged while waiting
13 for setup_continue to be called.
15 Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
16 Signed-off-by: Felipe Balbi <balbi@ti.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 drivers/usb/gadget/composite.c | 1 +
21 1 file changed, 1 insertion(+)
23 --- a/drivers/usb/gadget/composite.c
24 +++ b/drivers/usb/gadget/composite.c
25 @@ -584,6 +584,7 @@ static void reset_config(struct usb_comp
26 bitmap_zero(f->endpoints, 32);
29 + cdev->delayed_status = 0;
32 static int set_config(struct usb_composite_dev *cdev,