Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3261548rwb; Mon, 15 Aug 2022 22:36:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nv/YA/x2wVIt5S2ah3dw30DELpYrRsbe9eNap5q/FJbrLjtLmYmDW0+hwXtxdK2/pmjs1 X-Received: by 2002:a17:90b:1189:b0:1f5:1311:cd89 with SMTP id gk9-20020a17090b118900b001f51311cd89mr31285894pjb.181.1660628203455; Mon, 15 Aug 2022 22:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628203; cv=none; d=google.com; s=arc-20160816; b=S7OkESYL9K7CeoU+F4zO5M/lLCW60OdMqwLbFl0DXvZkT5DBJiUmkgYvA6bgtytdPa VJjXwgYXoX1Cv+6BHsMaRQw7M/dq9a+sF5l5hVwJeTGHMx+9oEST9TylGiZSerwd9yGu bPUmEIjr6UWhKY9rnS2biLJpqPct7LVcQuWVBKNWZ4NDzbbdTdwK8aIi6jc2z2PtyIAC QI3qIxTz1ZctKFUNqZTMT+U5Z4ZgjKdQ3XTRFqUK125a/H40fhYGd7hjSRKGAKFKer20 eG0oQ/BbyLZ7tRmJFZulyD04mPxYaTqlAwjh6cN/TPDHSML8pUhzAb+1zmKlnuuhv//C Xz3g== 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=VibfVXJZBlmqUSwk3g8x7DQ3yjwQ3JczaOkPAXeLJ1I=; b=itm8w3GCfGNM/kPG8u/6mDCZ1xDvQKIy6djKxsYpgbGrL53R6s3c3ZzsQxiA2sKSew EltAu5dE/IGgxdE0JfDJRGNV+846Mb+n/D/ZaYuw7X6s0m4MSQm+GwJ4y0U9V4r+c8Dq JLYwjp7Q4Z9JTBWKAOcoZ/A+iumrVWZXEdqL082P05Q6NUr44VvU3oXsvf9g0PizoOMy btlmnyunzVdgw0OvVLMHYWVYDL5HyjmRE6LAKBjmdScU3gdFIhRJwH1mrGTx6niQSWi4 +8c8jiiE1EiXwza5YgQKlbYs3wVpmbSeGNf3U7qbM0S7xa+5fv5ZLs7jRMSJ3BXR99GX gklQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZnyIb2Yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm6-20020a17090b3ec600b001ed0f6f1010si12974603pjb.70.2022.08.15.22.36.31; Mon, 15 Aug 2022 22:36:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZnyIb2Yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231938AbiHPEoA (ORCPT + 99 others); Tue, 16 Aug 2022 00:44:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232113AbiHPEku (ORCPT ); Tue, 16 Aug 2022 00:40:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DD1EA8962; Mon, 15 Aug 2022 13:33:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3CDB3B811B6; Mon, 15 Aug 2022 20:33:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F3C6C433D7; Mon, 15 Aug 2022 20:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595580; bh=x2Q/VPXMTMOlYtsTJ5bhyz1bIV5MeBrA1CJrnxVUrKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZnyIb2YdatmcFM6odJEDlR23QznmucF/oRfU2ehtYa1wMHCWenB6iaE1MBv7bCnDw C+Qlmz1G5cVXSYM98YvZXb+LrovYATmPzY+6CyBublhndsknq/3niPUviL8goky9Mn xriy6G/txwbZTlZa+nzjfDfvtlVZirmzCbP6VKhU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thinh Nguyen , Sasha Levin Subject: [PATCH 5.19 0810/1157] usb: dwc3: core: Deprecate GCTL.CORESOFTRESET Date: Mon, 15 Aug 2022 20:02:46 +0200 Message-Id: <20220815180511.894641368@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thinh Nguyen [ Upstream commit afbd04e66e5d16ca3c7ea2e3c56eca25558eacf3 ] Synopsys IP DWC_usb32 and DWC_usb31 version 1.90a and above deprecated GCTL.CORESOFTRESET. The DRD mode switching flow is updated to remove the GCTL soft reset. Add version checks to prevent using deprecated setting in mode switching flow. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/9df529fde6e55f5508321b6bc26e92848044ef2b.1655338967.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 573421984948..4c753cc0fa61 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -159,7 +159,8 @@ static void __dwc3_set_mode(struct work_struct *work) } /* For DRD host or device mode only */ - if (dwc->desired_dr_role != DWC3_GCTL_PRTCAP_OTG) { + if ((DWC3_IP_IS(DWC3) || DWC3_VER_IS_PRIOR(DWC31, 190A)) && + dwc->desired_dr_role != DWC3_GCTL_PRTCAP_OTG) { reg = dwc3_readl(dwc->regs, DWC3_GCTL); reg |= DWC3_GCTL_CORESOFTRESET; dwc3_writel(dwc->regs, DWC3_GCTL, reg); -- 2.35.1