summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2013-11-12 02:43:32 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-20 19:48:55 +0400
commit68c4e50ee15f1095be85ff2c670ed005a26c51c5 (patch)
tree0dc0502c0416b6d78606b82b58de430190fa576d /drivers/usb/gadget
parent14d9ceaf84edebb520b2b7c1f8800fef5364ccbf (diff)
downloadlinux-68c4e50ee15f1095be85ff2c670ed005a26c51c5.tar.xz
usb: gadget: composite: reset delayed_status on reset_config
commit 2bac51a1827a18821150ed8c9f9752c02f9c2b02 upstream. 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. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/composite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index d4f0f3305759..7c0adb9812aa 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)
bitmap_zero(f->endpoints, 32);
}
cdev->config = NULL;
+ cdev->delayed_status = 0;
}
static int set_config(struct usb_composite_dev *cdev,