Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp166596pxj; Tue, 18 May 2021 00:06:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkMd+quzPay8bOvAncOLUpXA2/RCNZ40MLASCvMQuT1mtL1mI9Q3EVf25sh9VKPcxuIZwX X-Received: by 2002:a6b:d609:: with SMTP id w9mr208805ioa.118.1621321565376; Tue, 18 May 2021 00:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621321565; cv=none; d=google.com; s=arc-20160816; b=NzrWnXynTukR4J9kjVCWMvZguiTIuJsy6kejGyPoTgdCFWuvy/lnPRZOTu6ci79MIw sb5nBXSV6FcdWmkmLuBrHz9vE21QiDecErqdVQ6rClnGBfmxWhJRqRPazqPbHWwnr6c0 romIWvBDNnt+FdA9jQaytV7uBMd1+kxy7d0qFMv8ETUIoG/MFcwaIw79/TNjhTg+fj+m 9KksSHa6B2a/MAcZHr6K59uY2XHdFLo+rRS0t4UrUUUDA0L09cuISoXH/JVAKwXVoIz6 18Ig7ubPL17i8rY9o5nM2RM+iLM8SnWYu9Qg51pH3lvcvx8zpqk8yMrSsLwFT3sXVARf x+Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/SpmQjwRlMfnlILuFIQ0UFsPyLV0/ZTRKzqJ8G/+qu0=; b=yBMBzLQnbnfNrCnQTSU7AkEdq27Dtr2GEop/9UtYwsF1LFXo4QETzIMvtl3mRrdlOM E1ZiZXyf8r/x45Jf2Lkkd0KURXxRXIU8lmYWZTYDt0chAH9B5pbyVqC3Jc6vgtT9uh8m RerwNusp8ISuP7ttGpsWxk0e0BROnxucycVTUdberRhEln6zXsHlKgfAAH+snG2xrKOb YwMlBi6AToHTZ/PPmuS9qkO0oTcIVCjDFO6Cxol6OKg/rlkMa+we6eCE38KlrY7lBpoL IQAvIvt6SpxV2t+y/lddzvgvl50ENScAIOFfZ2WCNo3FKpzdCKAd9Kptxp9oY+tFP0rB W21w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W3vK8vqr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si25012432iot.35.2021.05.18.00.05.52; Tue, 18 May 2021 00:06:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W3vK8vqr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241044AbhEQOxD (ORCPT + 99 others); Mon, 17 May 2021 10:53:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:54268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240230AbhEQOlU (ORCPT ); Mon, 17 May 2021 10:41:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D6BA261221; Mon, 17 May 2021 14:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261148; bh=0vrsYNOIc8zESrOuuzbh1miucDaaw9MeoIfhsBJVRTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W3vK8vqryfNsKVmizM48/MbCctN5qRLOAuBV2r+cXNRY0JbFFWha8bYgsf/i2sMm/ wlFlGEdhraM37pWMOJlUEtJD/YdcRzs1kA6NugcuqAXIAhJfNFuH8r1fjqiKz9gZed FsUo4gQUkoacN/bF4gJoZjCkrzLO5aDO1RzAMj0A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Jack Pham Subject: [PATCH 5.12 314/363] usb: dwc3: gadget: Enable suspend events Date: Mon, 17 May 2021 16:03:00 +0200 Message-Id: <20210517140313.227715572@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jack Pham commit d1d90dd27254c44d087ad3f8b5b3e4fff0571f45 upstream. commit 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") introduced (nearly 5 years ago!) an interrupt handler for U3/L1-L2 suspend events. The problem is that these events aren't currently enabled in the DEVTEN register so the handler is never even invoked. Fix this simply by enabling the corresponding bit in dwc3_gadget_enable_irq() using the same revision check as found in the handler. Fixes: 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") Acked-by: Felipe Balbi Signed-off-by: Jack Pham Cc: stable Link: https://lore.kernel.org/r/20210428090111.3370-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/gadget.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2302,6 +2302,10 @@ static void dwc3_gadget_enable_irq(struc if (DWC3_VER_IS_PRIOR(DWC3, 250A)) reg |= DWC3_DEVTEN_ULSTCNGEN; + /* On 2.30a and above this bit enables U3/L2-L1 Suspend Events */ + if (!DWC3_VER_IS_PRIOR(DWC3, 230A)) + reg |= DWC3_DEVTEN_EOPFEN; + dwc3_writel(dwc->regs, DWC3_DEVTEN, reg); }