From: Michael Grzeschik Date: Mon, 11 Nov 2013 22:43:32 +0000 (+0100) Subject: usb: gadget: composite: reset delayed_status on reset_config X-Git-Tag: v3.12.6~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68c4e50ee15f1095be85ff2c670ed005a26c51c5;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index d4f0f33057598..7c0adb9812aa5 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,