From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Felipe Balbi" , "Michael Grzeschik" Date: Sun, 29 Dec 2013 03:08:44 +0100 Message-ID: Subject: [PATCH 3.2 092/185] usb: gadget: composite: reset delayed_status on reset_config In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.2.54-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Michael Grzeschik 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: Ben Hutchings --- drivers/usb/gadget/composite.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -585,6 +585,7 @@ static void reset_config(struct usb_comp bitmap_zero(f->endpoints, 32); } cdev->config = NULL; + cdev->delayed_status = 0; } static int set_config(struct usb_composite_dev *cdev,