Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2885733rwb; Mon, 15 Aug 2022 13:18:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR7g90EepuazLM9AZAWieoZR9uunCT6aWqINXPilI/RpSu9T3QgmrmBhb2msbrnilIv+4zzF X-Received: by 2002:a17:906:cc0e:b0:731:6843:c198 with SMTP id ml14-20020a170906cc0e00b007316843c198mr11255763ejb.507.1660594700853; Mon, 15 Aug 2022 13:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594700; cv=none; d=google.com; s=arc-20160816; b=EHU/nQ01kMdQhCoR2AnQyq4dY5asVR1W+mFkBONq+wQVET02EqTnaCEk3JOVAAZ76u Km7yG4DsmgJSgxYwsQOotUheMnnu8tbiXoThzt8TpaOi7G/wXG6T9DMVjy7H4ayLRGE/ Vk4ZCxQswpOl8M0LZld96dRCGUq0tZaH4jxovnh3SU9SQWdt6BNs55bOhz8XQXy/TG12 tjJ67Y1OuV0PgeZYT/js476Rkzog4e2rmSDDgP6PAcS4HTNqM+Kh+jF0VBd2lUCfMFDd yqovYQyaClLllwzL/xoybeMFLycHOGiW0Qu/wmq2+mnk/5mzj/2ymqzrY23gWvMqE+gT JdxQ== 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=PzFUfepxPMszxrzVXBB8YQyPBRuLKSBD8UF1RWMeK68=; b=CkCGkanEphuU/IiCZakWqUVJvCKIJJq6he78y6fjv6SC0jcccgzvyFT40QbxhTKPOy dToqlaRmvbWt2ytM9uZMlv4zphUHDjG77ZlSi2Tqi4S/TjTXIFa9K1NHXIkA/0KEfUI1 vdtoy0KinU4jA2+QySKqJYEuQys5ow//7Cxh+XfQIiahvKyvdhTeqZ+9N/ZVScLaDX7k MD3lXQqLCwAUx4pJRrITx/g764OY4yl1ilHFRhnsiscKLoNPj9mja+/RbuxkuZBbV17i etYvX5rJ1v3KTY8OdNXZ+WiA1LFXpHYSIuHEaw+Cwqi3vwuU+s92RzbdP2I2bVxymkLq NeIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h65dcFq7; 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 gn23-20020a1709070d1700b00732fcbcfedesi8436859ejc.623.2022.08.15.13.17.54; Mon, 15 Aug 2022 13:18:20 -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=h65dcFq7; 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 S244272AbiHOTXy (ORCPT + 99 others); Mon, 15 Aug 2022 15:23:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344520AbiHOTVQ (ORCPT ); Mon, 15 Aug 2022 15:21:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 048A0266E; Mon, 15 Aug 2022 11:40:19 -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 05AFBB8108E; Mon, 15 Aug 2022 18:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CFD2C433C1; Mon, 15 Aug 2022 18:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588816; bh=bsGw4uDMs8FsR5eOfmnOT1bUWxKV1Eav05971gcZtZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h65dcFq7F/M4WPNgidBQ7zCQdbqAAd71W4UCsI6Q1SK8sW9BpnhH4U/nJUQM+dN2d 11/d5k5RzT+UHn5lR2zscreQyhDCD05qSaSsS2Ahkhx6u9ctWeUeiK2X5GITI7QRjK +Yxm3TTJnLVv8hZ94ERoSw8Ic+ZQH6QJFsNZPcNw= 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.15 492/779] usb: dwc3: core: Deprecate GCTL.CORESOFTRESET Date: Mon, 15 Aug 2022 20:02:16 +0200 Message-Id: <20220815180358.302886615@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 5cb1350ec66d..8adb26599797 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