Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1034880ybe; Wed, 4 Sep 2019 11:29:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFyoWCQP6dg7t6bW4UOjX+WPWG3szC3+KICh+VIYzXlTSJZ3Fy7xIY1v5FG3GVNgm12Sbt X-Received: by 2002:aa7:8a4e:: with SMTP id n14mr21355653pfa.170.1567621775684; Wed, 04 Sep 2019 11:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621775; cv=none; d=google.com; s=arc-20160816; b=DMQkjFdOmyOXtJ39Y7vXf07BrBXcbJDZyav9QML1CQJqond46z9NGhEH74Vf4+J72g vpnaxO2vhx7qnvS5jNpkLnLEOOEYVs7lEQDCTzka+WQEnd4SSRTTJoWgSjQ9glVCG6Nr 7UWVAmOKrUZypEB1vAZoLClUEXsGYCp1Hw9hfCpj2NtaKs+nbuoo4h8JIL9KOEHi1Bzu 5lVxjpoBzAT9Bsv+x/3BT+KXKk2VYzgTTovk+R6ANbtTWYXMev0PfQKgltx9c4vnoara loyahJ/nsgt3fVVUPo29xaaguvrL0zZq13VbPvBVkMwuDT6SqfYCEAHK7Tm3hyrkiK2P h6Pw== 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=V5iQvTtKxDbfqjOcD/sjb++oTGx71knvZYAb64NhlsA=; b=S+FUNqVXpEQgP43QoKTCmeN4lRJiH0if9gL1jYTUMtZiGMeW9tX+8Lo3uRMuyplSpX HwUvYzg1oxbKs6+tPMwwmGJTfKHhybJe6gC1+xhL/WXlkCtb7ZPLAlGC3/DbbJx/WO4d sI6fhW4z3cnQR+UrExC7G6WjPf3Yz1nGYrkuXlrjnS3LLWZ65LmuqS5/Lao7hsWRgkBw ysqKP7L/ge4G3ki8tgIspV4non/U9srD8jfoIxlQBznyqnBWZfnBsBMnsVWARE+uHaQM LFNVNdeP80Vj2mygRBAq0bV8PNqE7JqYZqQ24fqFN5iGNGJStR/CQ4IIoGwgoymVwH0o WtlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RRR9mLBN; 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 38si11788879pla.249.2019.09.04.11.29.19; Wed, 04 Sep 2019 11:29:35 -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=RRR9mLBN; 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 S2387842AbfIDR5X (ORCPT + 99 others); Wed, 4 Sep 2019 13:57:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:35220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387822AbfIDR5T (ORCPT ); Wed, 4 Sep 2019 13:57:19 -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 4EA462339E; Wed, 4 Sep 2019 17:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567619838; bh=C9yvWTJdzERYfS2Yx6bFhvJqt7qd67vfum1FMfH3rMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRR9mLBN3OT9SeGSx6yD0mMsO5tYavFBiQYF7p6MH6XGwRQIeGSbEvpAsx8NEoCUI +elfDVoTimexS6gj1PUeNvnFkPTrp+DFevcDAQsQHQKD1cIzlZU77EvWV5QWUUFZOb Wxv5R6MnB8V91PQZZWTCMOrc89Kus6O3obf8+tMA= 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 4.4 52/77] usb: gadget: composite: Clear "suspended" on reset/disconnect Date: Wed, 4 Sep 2019 19:53:39 +0200 Message-Id: <20190904175308.295739594@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175303.317468926@linuxfoundation.org> References: <20190904175303.317468926@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 8bf54477f4724..351a406b97af7 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1889,6 +1889,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