Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1017151ybe; Wed, 4 Sep 2019 11:11:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzk/Dlwzl4ufRh344kKvN76OtmAncQ+43PqOE2F09ZlkQl0eiQWcEXzntqJTYZ+DeU76jwu X-Received: by 2002:a17:90a:9f4a:: with SMTP id q10mr6073957pjv.83.1567620715557; Wed, 04 Sep 2019 11:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620715; cv=none; d=google.com; s=arc-20160816; b=X5RUmC9XCUTLHIf6yF2bOoNfYZ+97QZPoFvK58gc/tzkxTeth63raCe7XyW9rVQrkA YTrYYj+z5e5BXs6FY+hChEcLz1Dqb6364NgXyIH8vLOc66gMY9nNY58Y+B/317sQeNL5 05Gf5cY8zcskggCB1hIeqBB7J2KmTdAbJT6FhqxbOQKZfste+/n6QGkZ8NGqIeGZGeLV QPnL8fzc6qcp0Dtw1kzrjDhGXVainjY/dyX4YsT5j++qM8o6MNeFxk0AA6mR54IzV4vt VToBTzm6SF5GFqXQRxGdMCkJmfCc9zdXrP/EZ3M5D5SAmYRlukmi4uR3OH10dhaOK2hp 2TJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k4VZL4EWL2wkV9ibzIFiELCkfEx5NxgEwL57vbcq3i8=; b=oqOaKwopb4JNmNVzYeA4Up6TLImXt98l1G8oW9fUhHScdLN/av0XUUI62DWt9GtzQD M/C2QEeDQjQh7gFclaXztoYCuvdSaw5kg8EvNUwf0IKmQUEHqUSvNQbPV83/PvrWzeEm LkB96i1KNnn8E6jXHrSR8krjtH5rZM8Gj5GAlr9sPzwZVEtQSwhkAUVuqL3wU/tZheQZ 21Er7NS7THuT6ljQcDWeTO0wN33tk7aWoft+RIyuAtUhePy2/ayzhRQhOHIp7ba4qzCv wo/60q67vFg8wQuTDu55Sdoa+1gnrOaYzIzljgFEGAvRlVYMduocY/AJpg2cRX8TmG3l AERA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EE79A7e+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o35si2855182pje.106.2019.09.04.11.11.39; Wed, 04 Sep 2019 11:11:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EE79A7e+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390049AbfIDSKE (ORCPT + 99 others); Wed, 4 Sep 2019 14:10:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:53448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390032AbfIDSKC (ORCPT ); Wed, 4 Sep 2019 14:10:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDBEF208E4; Wed, 4 Sep 2019 18:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620601; bh=ewCJZV8Vixq4xGts43VedgHqguAgWQMen+I8V0h/bS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EE79A7e+R0uSm1aAW8WBCS/yv5x8pKb0KwksiAOVX+VWwYJAyaE3QiDMXiViezOKo q1NNfUd4otaeNAtHZoSN2WoGRL7na1bssV2UOOLXAhdCE8IgyzVqWwtVFX4qX4S9A1 iUxJiCLy0oVdFhOUm2qlmeZeJ2JcU6qlFP1Iwlbg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Herrenschmidt , Felipe Balbi , Sasha Levin Subject: [PATCH 5.2 026/143] usb: gadget: composite: Clear "suspended" on reset/disconnect Date: Wed, 4 Sep 2019 19:52:49 +0200 Message-Id: <20190904175315.087355422@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 602fda17c7356bb7ae98467d93549057481d11dd ] In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/gadget/composite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index b8a15840b4ffd..dfcabadeed01b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1976,6 +1976,7 @@ void composite_disconnect(struct usb_gadget *gadget) * disconnect callbacks? */ spin_lock_irqsave(&cdev->lock, flags); + cdev->suspended = 0; if (cdev->config) reset_config(cdev); if (cdev->driver->disconnect) -- 2.20.1