[RFC PATCH] UFS: Remove the timeout while send command
neil.armstrong at linaro.org
neil.armstrong at linaro.org
Fri Feb 28 16:24:58 CET 2025
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 ?
Neil
>
> ufs-versal2-pltfm ufs at f10b0000: Timedout waiting for UTP response
> ufs-versal2-pltfm ufs at f10b0000: OCS error from controller = f
>
> It's a temporary workaround to solve the timeout issue.
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
> 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);
More information about the U-Boot
mailing list