diff options
| author | Padmarao Begari <[email protected]> | 2025-11-26 16:06:41 +0100 |
|---|---|---|
| committer | Neil Armstrong <[email protected]> | 2026-03-02 15:19:17 +0100 |
| commit | 080b4f099558212703a772d3ca74c0521cf5a7e8 (patch) | |
| tree | 621159651e35669cc0a34878ac15cfdf6d36343f /drivers | |
| parent | 437ea9f8be5afaebe2d8cbab6242f1182857f21e (diff) | |
ufs: Disable UTP command timeout in slow mode
When the UFS controller is operating in slow (PWM) mode,
the driver is disabled the timeout for UTP send commands.
In high-speed mode, the timeout remains enabled to
detect stalled or failed transfers. This change ensures reliable
operation in slow mode, where command completion may take longer
and timeouts are not required.
Signed-off-by: Padmarao Begari <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://patch.msgid.link/e6deb9086afab9d2bdd53db8ecbc7db93af5204d.1764169598.git.michal.simek@amd.com
Signed-off-by: Neil Armstrong <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ufs/ufs-uclass.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ufs/ufs-uclass.c b/drivers/ufs/ufs-uclass.c index 3c8e4299259..7a80a9d5664 100644 --- a/drivers/ufs/ufs-uclass.c +++ b/drivers/ufs/ufs-uclass.c @@ -917,11 +917,13 @@ static int ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag) 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 (hba->max_pwr_info.info.pwr_rx != SLOWAUTO_MODE && + hba->max_pwr_info.info.pwr_tx != SLOWAUTO_MODE) { + 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) { |
