Hi,

On 04/03/2025 06:15, Abbarapu, Venkatesh wrote:
[AMD Official Use Only - AMD Internal Distribution Only]

Hi Neil,

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, February 28, 2025 8:55 PM
To: Abbarapu, Venkatesh <[email protected]>; [email protected]
Cc: Simek, Michal <[email protected]>; [email protected]; n-
[email protected]; git (AMD-Xilinx) <[email protected]>
Subject: Re: [RFC PATCH] UFS: Remove the timeout while send command

Hi,

On 27/02/2025 07:04, Venkatesh Yadav Abbarapu wrote:
Based on the UFS speed mode(HS or PWM) the timeout might vary and can
result timeouts.

Can't you bump the QUERY_REQ_TIMEOUT to the PWM timeout delay ?

Is there any way we can get the PWM timeout delay?
I think it also depends on the data size we are going to transfer right?
Any generic way to find the timeouts for PWM or HS modes.

I don't have access to the UFS spec, but perhaps Linux does the calculation 
here ?

Neil


Thanks
Venkatesh

Neil


ufs-versal2-pltfm ufs@f10b0000: Timedout waiting for UTP response
ufs-versal2-pltfm ufs@f10b0000: OCS error from controller = f

It's a temporary workaround to solve the timeout issue.

Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
---
   drivers/ufs/ufs.c | 9 ---------
   1 file changed, 9 deletions(-)

diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c index
f7d8c40c448..c3acbd709e7 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -858,7 +858,6 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba
*hba,

   static int ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
   {
-   unsigned long start;
     u32 intr_status;
     u32 enabled_intr_status;

@@ -867,19 +866,11 @@ static int ufshcd_send_command(struct ufs_hba *hba,
unsigned int task_tag)
     /* Make sure doorbell reg is updated before reading interrupt status */
     wmb();

-   start = get_timer(0);
     do {
             intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
             enabled_intr_status = intr_status & hba->intr_mask;
             ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);

-           if (get_timer(start) > QUERY_REQ_TIMEOUT) {
-                   dev_err(hba->dev,
-                           "Timedout waiting for UTP response\n");
-
-                   return -ETIMEDOUT;
-           }
-
             if (enabled_intr_status & UFSHCD_ERROR_MASK) {
                     dev_err(hba->dev, "Error in status:%08x\n",
                             enabled_intr_status);


Reply via email to