From: <ed.tsai@mediatek.com>
To: <alim.akhtar@samsung.com>, <avri.altman@wdc.com>,
<bvanassche@acm.org>, <James.Bottomley@HansenPartnership.com>,
<martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <wsd_upstream@mediatek.com>,
<peter.wang@mediatek.com>, <alice.chao@mediatek.com>,
<naomi.chu@mediatek.com>, <chun-hung.wu@mediatek.com>,
Ed Tsai <ed.tsai@mediatek.com>
Subject: [PATCH v3 3/3] ufs: core: Remove max_num_rtt field from ufs_hba_variant_ops
Date: Mon, 15 Jun 2026 13:57:17 +0800 [thread overview]
Message-ID: <20260615055802.105479-4-ed.tsai@mediatek.com> (raw)
In-Reply-To: <20260615055802.105479-1-ed.tsai@mediatek.com>
From: Ed Tsai <ed.tsai@mediatek.com>
Remove the max_num_rtt field from ufs_hba_variant_ops as it has been
replaced by the get_hba_nortt() callback which provides more flexible
platform-specific RTT capability handling.
Signed-off-by: Ed Tsai <ed.tsai@mediatek.com>
---
drivers/ufs/core/ufshcd.c | 4 +---
include/ufs/ufshcd.h | 2 --
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 382b6041c716..00072bff9dcd 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -8557,8 +8557,6 @@ static void ufshcd_set_rtt(struct ufs_hba *hba)
struct ufs_dev_info *dev_info = &hba->dev_info;
u32 rtt = 0;
u32 dev_rtt = 0;
- int host_rtt_cap = hba->vops && hba->vops->max_num_rtt ?
- hba->vops->max_num_rtt : hba->nortt;
/* RTT override makes sense only for UFS-4.0 and above */
if (dev_info->wspecversion < 0x400)
@@ -8574,7 +8572,7 @@ static void ufshcd_set_rtt(struct ufs_hba *hba)
if (dev_rtt != DEFAULT_MAX_NUM_RTT)
return;
- rtt = min_t(int, dev_info->rtt_cap, host_rtt_cap);
+ rtt = min_t(int, dev_info->rtt_cap, hba->nortt);
if (rtt == dev_rtt)
return;
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index 421c286481e8..13d0d7798294 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -370,7 +370,6 @@ struct ufshcd_tx_eq_params {
/**
* struct ufs_hba_variant_ops - variant specific callbacks
* @name: variant name
- * @max_num_rtt: maximum RTT supported by the host
* @init: called when the driver is initialized
* @exit: called to cleanup everything done in init
* @set_dma_mask: For setting another DMA mask than indicated by the 64AS
@@ -420,7 +419,6 @@ struct ufshcd_tx_eq_params {
*/
struct ufs_hba_variant_ops {
const char *name;
- int max_num_rtt;
int (*init)(struct ufs_hba *);
void (*exit)(struct ufs_hba *);
u32 (*get_ufs_hci_version)(struct ufs_hba *);
--
2.45.2
next prev parent reply other threads:[~2026-06-15 5:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 5:57 [PATCH v3 0/3] ufs: Add callback for vendor-specific RTT capability ed.tsai
2026-06-15 5:57 ` [PATCH v3 1/3] ufs: core: Add get_hba_nortt " ed.tsai
2026-06-15 8:44 ` Peter Wang (王信友)
2026-06-15 13:41 ` Bart Van Assche
2026-06-15 5:57 ` [PATCH v3 2/3] ufs: mediatek: Implement get_hba_nortt callback for " ed.tsai
2026-06-15 5:57 ` ed.tsai [this message]
2026-06-15 8:44 ` [PATCH v3 3/3] ufs: core: Remove max_num_rtt field from ufs_hba_variant_ops Peter Wang (王信友)
2026-06-15 13:40 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260615055802.105479-4-ed.tsai@mediatek.com \
--to=ed.tsai@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alice.chao@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=chun-hung.wu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=naomi.chu@mediatek.com \
--cc=peter.wang@mediatek.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox