diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2013-11-11 17:43:32 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-11-25 11:54:17 -0500 |
commit | 2bac51a1827a18821150ed8c9f9752c02f9c2b02 (patch) | |
tree | 0cba2044eb2fa51ed95c9ff7c8a3773cd50316eb /drivers/usb | |
parent | a655f481d83d6d37bec0a2ddfdd24c30ff8f541f (diff) |
usb: gadget: composite: reset delayed_status on reset_config
The delayed_status value is used to keep track of status response
packets on ep0. It needs to be reset or the set_config function would
still delay the answer, if the usb device got unplugged while waiting
for setup_continue to be called.
Cc: stable@vger.kernel.org
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/composite.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 3e7ae707f691..2018ba1a2172 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -593,6 +593,7 @@ static void reset_config(struct usb_composite_dev *cdev) | |||
593 | bitmap_zero(f->endpoints, 32); | 593 | bitmap_zero(f->endpoints, 32); |
594 | } | 594 | } |
595 | cdev->config = NULL; | 595 | cdev->config = NULL; |
596 | cdev->delayed_status = 0; | ||
596 | } | 597 | } |
597 | 598 | ||
598 | static int set_config(struct usb_composite_dev *cdev, | 599 | static int set_config(struct usb_composite_dev *cdev, |