Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp630684pxj; Tue, 18 May 2021 10:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4TkKTZSSj6Zju5281Ma/1ARy5qLUad5Z0bNOYtgbDFyF4MbJikF9R46wwKYSzKNUXjB3t X-Received: by 2002:a17:906:1794:: with SMTP id t20mr7258587eje.119.1621359360295; Tue, 18 May 2021 10:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621359360; cv=none; d=google.com; s=arc-20160816; b=wciPlTtFy8npUDHYbsqPBD6YJLOy0t34Jqvh9KDkj3w05iZCltt6fk4+c74gKzCl9K KfXOHIhlRFgL2LhB/j87Te32y7lwSV0l/P4TbtXvSVRRIOIdR0bVljebS8EXlgK03XFk QQvbxqsfd+1qeb6IDIMoYjQVeHrQTJPCAC2P5BxBryN9LiDHdIK1nNUK5nnUt3L2OO7N HXDFUiwgxP+O9WxsGKCASLr61Ynn1Dd9OIzgl2XtomE+lYuAXtcEGtHfr170jv4Sxwbv yC9ClLnUHdp/wF0Nb4yNTDBM+cR+7srpTuXFUfLBBIZUn4YdfvqFXXk1COSj5ZD1vZQY uXJg== 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=T0Sx4h++Zyc9QgQ5BKQysCU/nN1Jy4D68ZQRBE1PExY=; b=B6N6piLdS5cSSZmOti/G9nDAAcPb1hnvz55InzQZhX6twbD0KLkpx6Wq2GDKztMk8f CrJh0OJtT5jbARVt9xfoKronOTRjlJJw3L0maEKLHPbFAnmQTPL1vVxVQ47eURF5qJ+O 5TnZ2W3SKRq9/C3asAJboUwSx5KhWgq6jKvwX+d6yMcarSStJsGoBTHeQi5GGRyzs7mt ZxpucMKtQmOYB2xE1RI9egiTPcsKG8V4T3s0ZU2zi34glbUi66n1ryoniLNoR4HlPvgQ b4L2SAfRCn64ZPe0zrIMZC+KWqoLzBIEikXDwdemoE6kVesJB2Rw/mgBjFWW/16NeKPM NUGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DdkgSUdQ; 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 bf18si11507638edb.292.2021.05.18.10.35.01; Tue, 18 May 2021 10:36:00 -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=DdkgSUdQ; 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 S1346689AbhEQQJ3 (ORCPT + 99 others); Mon, 17 May 2021 12:09:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344957AbhEQPqJ (ORCPT ); Mon, 17 May 2021 11:46:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B41D061428; Mon, 17 May 2021 14:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262648; bh=j10Tu3XCs6O+GEPElE0P5RSfy4Ez9e4IVLaC2L3GgCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdkgSUdQHcHZo1BXq6A5BDKEupAyguMErH5jn7APSviDzz61FgEcfjO08sTdkGaVG HAaRrOS+pFJ4CBNfy/h5CVjpf4lsgKuTsn0hWQJDfIp1pQUtSNfL3RhbaQaXkmLRBO aWNICzVCzsnxakW1VA1rh9Bw2/ycExzrPLU6GQOI= 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.10 245/289] usb: dwc3: gadget: Enable suspend events Date: Mon, 17 May 2021 16:02:50 +0200 Message-Id: <20210517140313.397506831@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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 @@ -2206,6 +2206,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); }