mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>
To: Bart Van Assche <bvanassche@acm.org>, <quic_cang@quicinc.com>,
	<quic_nitirawa@quicinc.com>, <avri.altman@wdc.com>,
	<beanhuo@micron.com>, <adrian.hunter@intel.com>,
	<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"open list:ARM/QUALCOMM SUPPORT" <linux-arm-msm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] scsi: ufs: qcom: Update the UIC Command Timeout
Date: Wed, 22 May 2024 13:56:30 -0700	[thread overview]
Message-ID: <f9595b82-66f9-dce2-7fba-c42b1eacf962@quicinc.com> (raw)
In-Reply-To: <2ec8a7a6-c2cd-4861-9a43-8a4652e0f116@acm.org>

On 5/22/2024 11:18 AM, Bart Van Assche wrote:
> On 5/22/24 00:01, Bao D. Nguyen wrote:
>> Change the UIC command timeout to 2 seconds.
>> This extra time is to allow the uart occasionally print long
>> debug messages and logging from different modules during
>> product development. With the default hardcoded 500ms timeout,
>> the uart printing with interrupt disabled may cause the UIC command
>> interrupt get starved, resulting in a UIC command timeout and
>> eventually a watchdog timeout.
>> When a product development completes, the vendors may
>> select a different UIC command timeout as desired.
>>
>> Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
>> ---
>>   drivers/ufs/host/ufs-qcom.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
>> index 79f8cb3..4649e0f 100644
>> --- a/drivers/ufs/host/ufs-qcom.c
>> +++ b/drivers/ufs/host/ufs-qcom.c
>> @@ -49,6 +49,7 @@ enum {
>>   #define QCOM_UFS_MAX_GEAR 4
>>   #define QCOM_UFS_MAX_LANE 2
>> +#define QCOM_UIC_CMD_TIMEOUT_MS 2000
>>   enum {
>>       MODE_MIN,
>> @@ -1111,6 +1112,8 @@ static int ufs_qcom_init(struct ufs_hba *hba)
>>           dev_warn(dev, "%s: failed to configure the testbus %d\n",
>>                   __func__, err);
>> +    hba->uic_cmd_timeout = QCOM_UIC_CMD_TIMEOUT_MS;
>> +
>>       return 0;
>>   out_variant_clear:
> 
> Given the description of patch 1, the addressed issue is not specific to
> a single vendor. Is that correct?

The issue we are trying to address is not specific to a single vendor.
Any vendor would have a freedom to choose the UIC command timeout. At 
different times during their product development, they can choose 
different UIC command timeout, or use the default 500ms. It's the 
flexibility we would like to give to vendors.

> 
> Since the described issue is only encountered during development, why to
> modify the UIC command timeout unconditionally?

The vendors can enjoy the default 500ms UIC timeout if they prefer.
As long as they don't write to hba->uic_cmd_timeout in the vendor's 
initialization routine, the default value of 500ms will be used.

Thanks,
Bao

> 
> Thanks,
> 
> Bart.


  reply	other threads:[~2024-05-22 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1716359578.git.quic_nguyenb@quicinc.com>
2024-05-22  7:01 ` [PATCH v1 1/2] scsi: ufs: core: Support Updating " Bao D. Nguyen
2024-05-22 18:16   ` Bart Van Assche
2024-05-22 20:51     ` Bao D. Nguyen
2024-05-23  4:38       ` Manivannan Sadhasivam
2024-05-23  5:40         ` Bao D. Nguyen
2024-05-22  7:01 ` [PATCH v1 2/2] scsi: ufs: qcom: Update the " Bao D. Nguyen
2024-05-22 18:18   ` Bart Van Assche
2024-05-22 20:56     ` Bao D. Nguyen [this message]
2024-05-22 21:01       ` Bart Van Assche
2024-05-23  3:18         ` Avri Altman
2024-05-23  5:42           ` Bao D. Nguyen
2024-05-23  5:34         ` Bao D. Nguyen

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=f9595b82-66f9-dce2-7fba-c42b1eacf962@quicinc.com \
    --to=quic_nguyenb@quicinc.com \
    --cc=adrian.hunter@intel.com \
    --cc=andersson@kernel.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_nitirawa@quicinc.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

all inboxes | Powered by JetHome®