Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1011510ybe; Wed, 4 Sep 2019 11:07:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRmIZcGyzLx2aUgH99FcP9/9rfpNoqUhBZBiTLTd1LwuIwx15lGhCno2y98mJtymwIUzvH X-Received: by 2002:a17:902:6b07:: with SMTP id o7mr28251710plk.180.1567620433592; Wed, 04 Sep 2019 11:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620433; cv=none; d=google.com; s=arc-20160816; b=QTzKDUNFdnMPMylCArQceitOOGHNBrOxo2Be+W4FeFC/0n41hSY/JMOhoixWE/ehYc EhD/0AsgWxv2CTXK7fG21bUdYyeOTUkOPBA4rhOkcRtmrriaXsnaS2KySXOl03ED8N5C 3EJj6X6aT/eUD4f/vCm9BoTMib0Y4i0hMwF+Ost/nWjOBVfmxMP95UcdjySaP/vW7BFJ aWYMCTxRYqFiTsPRHEwccGrpyDKCZ7qQXWFHp2k8/5+8T6Xnzi7hJlTy239WKNnYl32P vuVcMIZx+nDY4wWqUL7/Ozvi1vZ0zY4+7Tpw3kPAsyTQERtqK8cEjZ6rINcWfGDkj6aC FA/A== 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=kfQNy+HFI5P+HL0xR8hwlpzIkSSpnQGJXFBSeoiBKYs=; b=v7NnfZEOvWd1MU+OMwZ0bio8DfiQhptdxWBqu+U3foPz4KH6xj+C6fwkyaks+AXpJf keRyHMbMklA/D0TFDfPPNq4VGgCe57n7FeBzx0Ajh/Sl90BLjhvWMl7GoV1aHjQIVkiS ebbt91Q+rZv+XAPVFHUjkkWQsiKXx3Iw9RymR45aSYEuwiFsd9qdL391OxZxtTAWZNip hkKBYwOUMTcHr9SHajfjUmei46ZMMVsJjP/XHFO0KJ5eqiHdGf6kJinRhn/YWJEUMHBX l/x8GyAmGm/2zzyLFVjaAaACRSagkumIsx10l/dkOrH+rbFddFgHUCpz3WSKrFmPI0fK Dipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QQ8cdMFq; 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 y7si9021985pll.314.2019.09.04.11.06.54; Wed, 04 Sep 2019 11:07:13 -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=QQ8cdMFq; 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 S2389045AbfIDSEA (ORCPT + 99 others); Wed, 4 Sep 2019 14:04:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:44820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389039AbfIDSD7 (ORCPT ); Wed, 4 Sep 2019 14:03:59 -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 14C34208E4; Wed, 4 Sep 2019 18:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620238; bh=qgE1MOw+R/xp4yBWfTe64ZuPrK2nXnkA48p7BF6ux6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQ8cdMFqxeynkZqkk+iUscI9PAogRlu4hJgRmjIuuGho7xdB1wNMGsXAgioY+mVaw N4BbM1AQ5liojL3xvX/f+5JFwq+yfleSIyXpFG78ld6+F41alYhyjn4GQ9eprj2DS7 puaYpOBfCagt6RIF6eOnVNmrsYUQDu0fq1yLI2eA= 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.14 04/57] usb: gadget: composite: Clear "suspended" on reset/disconnect Date: Wed, 4 Sep 2019 19:53:32 +0200 Message-Id: <20190904175302.410307185@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175301.777414715@linuxfoundation.org> References: <20190904175301.777414715@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 b805962f51543..75c42393b64ba 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -2008,6 +2008,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