Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp715975pxb; Wed, 27 Jan 2021 20:29:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdlwXJytNbLWTbYbc9cspuHqXTL2NAeeAVHR5jNh2Ewc/j6wsjBHvx0lOvM1Kb95hqxYKw X-Received: by 2002:a05:6402:1f4:: with SMTP id i20mr11775789edy.180.1611808176030; Wed, 27 Jan 2021 20:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611808176; cv=none; d=google.com; s=arc-20160816; b=HSpVESE9q0vAeZ4UXCcpeuYo9bc/J1IZQRVhOJ+zsLzSXXFo8YvRZsBkpbrQr6uySU Ed6YOzOmx8Lb7A6AVJYQe020GSzGMtRlqcWr+bkpEA0Gntnl9tx4yb3uKEC49m8I09Qi grn5ixOLF75BqHvp064WSv4NzHA0zNdDFUEF35s6wY8+ZaMOV9BvC78Q6qgQbNBu3Nod 5yw8BzKcwXGuaerHJz2QHYsYP07teQaloU/aFDoPBsG80GYJg5DR1zvTXJO3lKFg09VS b9mUivSWOkvakAva420LnAJPaTAnjUKYeGO3ikPg+HLoTf9jN49MFyxTrzKrl+wNlzBu u+Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=k799vAWQKhIKDzFLTFOrNxO82k2RAuyDNRkNXxXXN5A=; b=NnYc/xvICVvTGKV7iU3XncGUvjD+fyX25nZIObeZsqO4PiFcJ5xsrgoqXAiRXDw+CE eI9fDqK7c3Y7lCSv4fzmVYn7X+pyC4qFTXpR6ZmsgqwXLFGwLCSpE+zA8uYGBgxSvdoj V6fKqyQZuPloqW1Nbm38h4jU3IBhNxpRnIDKF3lVwqck8oNOtM+SPjzxo5F1Gj7wnm3g Bv784HTJPlbM7fnuGk01Qw8AB2lsFTwL1lpfDoIyJe+TrQChZG2gn/29UlJwHI3jLglD UMk/hiR3qzaepIeGs/2jxg7hg7FqTq4va998oK4usNV2a54jFrcBvNn6qbxPXEUNukSJ hqCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=lOigCKwb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si2316807edb.8.2021.01.27.20.29.12; Wed, 27 Jan 2021 20:29:36 -0800 (PST) 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=@mg.codeaurora.org header.s=smtp header.b=lOigCKwb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229748AbhA1Dfj (ORCPT + 99 others); Wed, 27 Jan 2021 22:35:39 -0500 Received: from a1.mail.mailgun.net ([198.61.254.60]:29326 "EHLO a1.mail.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbhA1Dfg (ORCPT ); Wed, 27 Jan 2021 22:35:36 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1611804918; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=k799vAWQKhIKDzFLTFOrNxO82k2RAuyDNRkNXxXXN5A=; b=lOigCKwb4wo951H1cs7oNrpD8r985p0JGIaKfLm5ivrTlzBUSBJQB8wh4FA+sjtCBZbBJ2/Z 6B8fVcqODSSZ/lWuwnZ5wp8dp3ZLFW8CJ6Gsju6r3MXzFXyxsn3BLXzgyErDGGDQQbXgCR/A +LYpQUsWOzkzOLQV9WN7Bexeb0o= X-Mailgun-Sending-Ip: 198.61.254.60 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 601230d7d75e1218e355a531 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 28 Jan 2021 03:34:47 GMT Sender: cang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 39673C43462; Thu, 28 Jan 2021 03:34:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 565E7C433CA; Thu, 28 Jan 2021 03:34:45 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 28 Jan 2021 11:34:45 +0800 From: Can Guo To: Bjorn Andersson Cc: jaegeuk@kernel.org, asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , open list Subject: Re: [PATCH v2] scsi: ufs: Give clk scaling min gear a value In-Reply-To: <20210128032807.GA5254@yoga> References: <1611802172-37802-1-git-send-email-cang@codeaurora.org> <20210128032807.GA5254@yoga> Message-ID: <8c0d0edebbfaa0fdd47acb6d180fa84d@codeaurora.org> X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-28 11:28, Bjorn Andersson wrote: > On Wed 27 Jan 20:49 CST 2021, Can Guo wrote: > >> The initialization of clk_scaling.min_gear was removed by mistake. >> This >> change adds it back, otherwise clock scaling down would fail. >> > > Thanks for the patch Can, it solves the problem I'm seeing! > > Reviewed-by: Bjorn Andersson > Tested-by: Bjorn Andersson > > > And perhaps a: > > Reported-by: Bjorn Andersson > I missed the two lines due to I was not working on the latest scsi code tip - I should have tested it based on commit 29b87e92a216 ("scsi: ufs: Stop hardcoding the scale down gear"), my bad. Anyways, thanks for the test! Regards, Can Guo. > Regards, > Bjorn > >> Fixes: 4543d9d78227 ("scsi: ufs: Refactor >> ufshcd_init/exit_clk_scaling/gating()") >> >> Signed-off-by: Can Guo >> --- >> drivers/scsi/ufs/ufshcd.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c >> index 36bcbb3..8ef6796 100644 >> --- a/drivers/scsi/ufs/ufshcd.c >> +++ b/drivers/scsi/ufs/ufshcd.c >> @@ -1602,6 +1602,9 @@ static void ufshcd_init_clk_scaling(struct >> ufs_hba *hba) >> if (!ufshcd_is_clkscaling_supported(hba)) >> return; >> >> + if (!hba->clk_scaling.min_gear) >> + hba->clk_scaling.min_gear = UFS_HS_G1; >> + >> INIT_WORK(&hba->clk_scaling.suspend_work, >> ufshcd_clk_scaling_suspend_work); >> INIT_WORK(&hba->clk_scaling.resume_work, >> -- >> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a >> Linux Foundation Collaborative Project. >>