From patchwork Thu Nov 7 09:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 11232413 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA0C3139A for ; Thu, 7 Nov 2019 09:48:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC999214D8 for ; Thu, 7 Nov 2019 09:48:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="LRdStRmH"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="fGDthPG7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387970AbfKGJso (ORCPT ); Thu, 7 Nov 2019 04:48:44 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60668 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387953AbfKGJsn (ORCPT ); Thu, 7 Nov 2019 04:48:43 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 23BC460AE0; Thu, 7 Nov 2019 09:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573120121; bh=Z/gM5P68WLWvCZB51tsvqVWHsqNgoEyWAIKUMnoxRgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LRdStRmHpSHxFJNWmi0HFQ5F6e2PNxw9OG6JyP+zGfFoalP7zwcODdwA+CwN1cgf8 CMO+nTLPCvDuxvQA1qvYLxxKvMFu+f/Kc6Pf8o9owrGQek3JTOiBOHHOGOUiG4Ifg+ VQpuDKU0WBWehf2WD9iWHxsLyfwdrT/ZayeerCAs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cang@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9E8DC60A96; Thu, 7 Nov 2019 09:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573120117; bh=Z/gM5P68WLWvCZB51tsvqVWHsqNgoEyWAIKUMnoxRgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fGDthPG7ZvOWAYVjY8WffE5fSHrHltZh8Sa8k2BdhH7a8ZoX3HO5/1+yt9y2LKtfZ z/z/rh40+RXvR2o6fMsS0X8bzO1WCbLWqloIg6fmN3isnOHeZtLKnlnJcSjH6YnZcc 9FBckO3sWyxqZqlpznx/67Zj2ACPUgr6sKtzofLE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9E8DC60A96 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cang@codeaurora.org From: Can Guo To: asutoshd@codeaurora.org, nguyenb@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 , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Tomas Winkler , Venkat Gopalakrishnan , Subhash Jadavani , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 3/6] scsi: ufs: Remove the check before call setup clock notify vops Date: Thu, 7 Nov 2019 01:47:54 -0800 Message-Id: <1573120078-15547-4-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1573120078-15547-1-git-send-email-cang@codeaurora.org> References: <1573120078-15547-1-git-send-email-cang@codeaurora.org> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The functionality of vendor specific ops should be handled properly in platform specific driver, but should not count on the UFS driver. Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c386c2d..4dfd705 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7379,16 +7379,9 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, if (list_empty(head)) goto out; - /* - * vendor specific setup_clocks ops may depend on clocks managed by - * this standard driver hence call the vendor specific setup_clocks - * before disabling the clocks managed here. - */ - if (!on) { - ret = ufshcd_vops_setup_clocks(hba, on, PRE_CHANGE); - if (ret) - return ret; - } + ret = ufshcd_vops_setup_clocks(hba, on, PRE_CHANGE); + if (ret) + return ret; list_for_each_entry(clki, head, list) { if (!IS_ERR_OR_NULL(clki->clk)) { @@ -7412,16 +7405,9 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, } } - /* - * vendor specific setup_clocks ops may depend on clocks managed by - * this standard driver hence call the vendor specific setup_clocks - * after enabling the clocks managed here. - */ - if (on) { - ret = ufshcd_vops_setup_clocks(hba, on, POST_CHANGE); - if (ret) - return ret; - } + ret = ufshcd_vops_setup_clocks(hba, on, POST_CHANGE); + if (ret) + return ret; out: if (ret) {