From patchwork Tue Feb 20 09:42:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UGV0ZXIgV2FuZyAo546L5L+h5Y+LKQ==?= X-Patchwork-Id: 13563779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75466C48BC4 for ; Tue, 20 Feb 2024 09:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Rr34nSYkfVYWl9vNR82EflNeNhAQmo3RiI09pkVtZqg=; b=fqhk1tFPAXvmRHPGb+ZBjyGEw/ t0gnXAcTzPp5xNrU8Mam+nGcIHmKVUqOnFYtdve/1zzNNDeVuF+9m7RCTlFlEKND1A/FnBJK1Cx7S F8PRPU90bh5JHRHcFycSL2esHJganBGtLzwnxuE/ULWRgV3IZrzQyFf5y1yrLU47TtdZtUQVwXHkq PPoWr6uMEdqq8lxZtGtZyhsUGYx2FytDRurXygMKGOp/Lm8heSwjXm5ATtD7UCMUVaqjeLFWJJdRo EWJYXlGOuSVoiU10CIsr5V0BPpCTMWCSE1KVz9H4EF4GoeOtvxMFZA+Dz4s7w2LQt7hxlZH4Iv273 aakmp+dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcMe8-0000000E3kM-3F7Q; Tue, 20 Feb 2024 09:42:40 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcMe5-0000000E3h2-3B31 for linux-mediatek@lists.infradead.org; Tue, 20 Feb 2024 09:42:39 +0000 X-UUID: 5dfe0adccfd411ee9a263b4415211400-20240220 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=Rr34nSYkfVYWl9vNR82EflNeNhAQmo3RiI09pkVtZqg=; b=fnv28pBBy/S1UXqVYovP3L+9Nng4NRUzLHCoKXDa1qMIn0smurp2f2SL1MM0z2we39A158Zh3XJz193eZ3kqMfMZTYLhWFrCZAMHUmiIDBTdshmBU8tyKHL8lQepElACwTxL/1L/5qSdBmv2ipwv6LHoczxnCclvXwlO6gP7bXQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:6fc4c34b-961e-4636-8865-ca7623caa55c,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:6f543d0,CLOUDID:4a71fefe-c16b-4159-a099-3b9d0558e447,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 5dfe0adccfd411ee9a263b4415211400-20240220 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1303220657; Tue, 20 Feb 2024 02:42:31 -0700 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 20 Feb 2024 17:42:12 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 20 Feb 2024 17:42:12 +0800 From: To: , , , , CC: , , , , , , , , , , , , , , Subject: [PATCH v1] ufs: core: adjust config_scsi_dev usage Date: Tue, 20 Feb 2024 17:42:11 +0800 Message-ID: <20240220094211.20678-1-peter.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--6.178500-8.000000 X-TMASE-MatchedRID: n/G9Jfep/EYMQLXc2MGSbKTfLKfi4+0tuLwbhNl9B5Us/uUAk6xP7PlY oV6p/cSxwX0f1lPumDj1yfaRXbFRICnBjLyZTfQTNCWPXerN72lMQULTNXtspEdmDSBYfnJR5gc Q9o9yjpv1vHe0RNYkzJcZ0icLp7DqHxPMjOKY7A8LbigRnpKlKSPzRlrdFGDwHjhYSa0rs6iGR2 xllP65/tmk23bNIjzMi6H1+hjNWVVt6nh0ne7HIQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.178500-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 2BCA890089EEFB661030E6316E3C738722300088576542079DF0C79E4F013EB42000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_014237_845962_4596B1F7 X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Peter Wang Adjust the usage of config_scis_dev to mach the existing usage of other vops in ufs driver. Signed-off-by: Peter Wang --- drivers/ufs/core/ufshcd-priv.h | 7 +++++++ drivers/ufs/core/ufshcd.c | 3 +-- include/ufs/ufshcd.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index f42d99ce5bf1..72d5287c15ee 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -288,6 +288,13 @@ static inline int ufshcd_mcq_vops_config_esi(struct ufs_hba *hba) return -EOPNOTSUPP; } +static inline void ufshcd_vops_config_scsi_dev(struct ufs_hba *hba, + struct scsi_device *sdev) +{ + if (hba->vops && hba->vops->config_scsi_dev) + hba->vops->config_scsi_dev(sdev); +} + extern const struct ufs_pm_lvl_states ufs_pm_lvl_states[]; /** diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 16d76325039a..92f9de1d3152 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5211,8 +5211,7 @@ static int ufshcd_slave_configure(struct scsi_device *sdev) */ sdev->silence_suspend = 1; - if (hba->vops && hba->vops->config_scsi_dev) - hba->vops->config_scsi_dev(sdev); + ufshcd_vops_config_scsi_dev(hba, sdev); ufshcd_crypto_register(hba, q); diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index 7f0b2c5599cd..a19d87e7980f 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -327,6 +327,7 @@ struct ufs_pwr_mode_info { * @op_runtime_config: called to config Operation and runtime regs Pointers * @get_outstanding_cqs: called to get outstanding completion queues * @config_esi: called to config Event Specific Interrupt + * @config_scsi_dev: called to configure scsi device parameters */ struct ufs_hba_variant_ops { const char *name;