Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "beanhuo@micron.com" <beanhuo@micron.com>,
	"sh043.lee@samsung.com" <sh043.lee@samsung.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"storage.sec@samsung.com" <storage.sec@samsung.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH] UFS: Make TM command timeout configurable from host side
Date: Tue, 11 Nov 2025 09:03:08 +0000	[thread overview]
Message-ID: <f3b1641b9e611f2e4cac55e20a6410f9a9a88fa3.camel@mediatek.com> (raw)
In-Reply-To: <009401dc52e7$5d042cf0$170c86d0$@samsung.com>

On Tue, 2025-11-11 at 17:44 +0900, Seunghui Lee wrote:
> 
> 
> Thank you for your kind opinion.
> As you know, it's not easy to modify default value.
> Because it effects all devices.
> 
> Should I read the tm_cmd_timeout from dt property?
> What do you think?
> 
> * drivers/ufs/host/ufhcd-pltfrm.c
> 
> static void ufshcd_init_tm_cmd_timeout(struct ufs_hba *hba)
> {
>         struct device *dev = hba->dev;
>         int ret;
> 
>         ret = of_property_read_u32(dev->of_node, "tm_cmd_timeout",
>                         &hba->tm_cmd_timeout);
>         if (ret) {
>                 dev_dbg(hba->dev,
>                                 "%s: failed to read tm_cmd_timeout,
> ret=%d\n",
>                                 __func__, ret);
>                 hba->tm_cmd_timeout = TM_CMD_TIMEOUT;
>         }
> }
> 
> Thanks,
> Seunghui Lee.
> 

Hi Seunghui,

It seems that there is no node in the DTS to describe the
UFS device. The UFS host node is not suitable, because the
timeout value depends on the UFS device itself.

Since you found that some devices may have TM command 
times exceeding 100ms, why not add a device quirk and change 
the timeout value only for those devices?

Alternatively, you could consider using a module parameter, 
similar to uic_cmd_timeout and dev_cmd_timeout.

Thanks.
Peter

  reply	other threads:[~2025-11-11  9:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20251106012702epcas1p28fdeed020ea44f18dcc751c283fbbcc2@epcas1p2.samsung.com>
2025-11-06  1:26 ` [PATCH] UFS: Make TM command timeout configurable from host side Seunghui Lee
2025-11-11  2:46   ` Peter Wang (王信友)
2025-11-11  8:44     ` Seunghui Lee
2025-11-11  9:03       ` Peter Wang (王信友) [this message]
2025-11-11 16:37         ` Bart Van Assche
2025-11-12  2:58           ` Peter Wang (王信友)
2025-11-12  8:49             ` Seunghui Lee
2025-11-12  9:42               ` Peter Wang (王信友)
2025-11-12 16:51             ` Bart Van Assche
2025-11-13 10:08               ` Peter Wang (王信友)
2025-11-17  7:11                 ` Seunghui Lee
2025-11-17  8:40                   ` Peter Wang (王信友)
2025-11-17  9:48                     ` Seunghui Lee
2025-11-18  5:48                       ` Peter Wang (王信友)
2025-11-17 16:43                   ` Bart Van Assche
2025-11-18  5:55                     ` Peter Wang (王信友)
2025-11-18 17:31                       ` Bart Van Assche
2025-11-19  9:20                         ` Peter Wang (王信友)
2025-11-17 16:40                 ` Bart Van Assche
2025-11-18  5:52                   ` Peter Wang (王信友)
2025-11-11 16:38   ` 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=f3b1641b9e611f2e4cac55e20a6410f9a9a88fa3.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sh043.lee@samsung.com \
    --cc=storage.sec@samsung.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