Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2024747pxu; Sun, 13 Dec 2020 10:59:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxo9hNAYyyCq60krOZiJfw11fDkUlm5arbe2EE6aGcNgjCLstqCd+aLK/N0K6sO9tWLYy5+ X-Received: by 2002:a17:906:417:: with SMTP id d23mr19791520eja.19.1607885943617; Sun, 13 Dec 2020 10:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607885943; cv=none; d=google.com; s=arc-20160816; b=YdPdpADaIOLZfxndu/hbRmNVIdc08iRQ2gw6NCUCPjLoghroOxLTehv2wcAg5f/Rkw W5OsNPxwTcLSydaaahNJdEOK3b5GMdPmw9d+LDJVpUdbTJYgT9zCr8dWw66RJbFvCZ1d HW9aOW3z2f1jY31hitp5RFd6Rs4m7D7sQ33XT8hEVtIzp84S1y8XEoTyVQwU4/UI8fFE QXyOIkqiYfBvbQiXK6XhsojY5kR2fQmYIEhegW+0vnn3igBuo1NcZS8roAM7LOpP/u7B qVeJMVGggbXJU8kpQTM2oNcwCBS2tpYFungswY7OSrf+806/7jAkmlqPekwpH6U+LE1e o49g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr; bh=uI4n2NcGE/HnX6pt0uqDuOER0pj4Kw2jEnyB4oSFqvM=; b=PhyoojsflTge5MmWyCtuOl5gEoKbOFNZ0L9tkHRpBjAQbuZeyEblPZc8PZTgaWeyGG 8/pHG/LNQ957frSM5sf5RXyQS4/uOj1j42wsAnq+qWZqwOj7JvcYUfRcAljN8BuZ63ZN Htazk4TP1jKLazNOx+eA0fz0dzWeRa18JWv3IUvHVkAEAHV5GmHWu9tDHHDiA6F9vftJ 9JyAtT1t8jyMJ/445UTPgT9KAqMNlfaOC++hAEBONLqnyV/SqSi7u0hQ2Vl6JAVBzFqG acebNmHi6Orpcqj8jBAR7/P7xPlDjiTE/HksUgoOe9csAFlRoYYl5PcwlLz4ulgaFJLd OU3A== ARC-Authentication-Results: i=1; mx.google.com; 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 dg28si8943009edb.167.2020.12.13.10.58.41; Sun, 13 Dec 2020 10:59:03 -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; 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 S2437117AbgLMQdb (ORCPT + 99 others); Sun, 13 Dec 2020 11:33:31 -0500 Received: from labrats.qualcomm.com ([199.106.110.90]:14649 "EHLO labrats.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405775AbgLMQcz (ORCPT ); Sun, 13 Dec 2020 11:32:55 -0500 IronPort-SDR: wGkbvEQBJudY7y6PcFudy51EpAJD8cwG4lFHTP7YbSxadDgh+AoZlNBtVdRZg9/mAtcd783KUh qMJW97vCsILB6mqQYIeeCEv+gWSxA7deinYeGenkgyYQ9ycwhwzkLAQ9vPNJxsF3ic48oUPjfj IKxo3EmOh6TtnQavLZ0WKYIXF2Y7gbrC6r8vlH3tqS7BrkzuFtdQg3OtzOi+mQQkstFF+AIdpO PTQXbHRS9OUEENwctg0HIJ5p0R13I+hZhvWXeE9YDvb5NQkqTxsfMG+YQcinUNyHS2qK4jYgf3 dTY= X-IronPort-AV: E=Sophos;i="5.78,416,1599548400"; d="scan'208";a="29356199" Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by labrats.qualcomm.com with ESMTP; 13 Dec 2020 08:32:00 -0800 X-QCInternal: smtphost Received: from wsp769891wss.qualcomm.com (HELO stor-presley.qualcomm.com) ([192.168.140.85]) by ironmsg05-sd.qualcomm.com with ESMTP; 13 Dec 2020 08:31:59 -0800 Received: by stor-presley.qualcomm.com (Postfix, from userid 359480) id 775B82171F; Sun, 13 Dec 2020 08:31:59 -0800 (PST) From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 3/3] scsi: ufs: Revert "Make sure clk scaling happens only when HBA is runtime ACTIVE" Date: Sun, 13 Dec 2020 08:31:44 -0800 Message-Id: <1607877104-8916-4-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607877104-8916-1-git-send-email-cang@codeaurora.org> References: <1607877104-8916-1-git-send-email-cang@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 73cc291c27024 ("Make sure clk scaling happens only when HBA is runtime ACTIVE") is no longer needed since commit f7a42540928a8 ("scsi: ufs: Protect some contexts from unexpected clock scaling") is a more mature fix to protect UFS LLD stability from clock scaling invoked through sysfs nodes by users. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 80f82cb..052479a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1300,15 +1300,8 @@ static int ufshcd_devfreq_target(struct device *dev, } spin_unlock_irqrestore(hba->host->host_lock, irq_flags); - pm_runtime_get_noresume(hba->dev); - if (!pm_runtime_active(hba->dev)) { - pm_runtime_put_noidle(hba->dev); - ret = -EAGAIN; - goto out; - } start = ktime_get(); ret = ufshcd_devfreq_scale(hba, scale_up); - pm_runtime_put(hba->dev); trace_ufshcd_profile_clk_scaling(dev_name(hba->dev), (scale_up ? "up" : "down"), -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.