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 <padmarao.begari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/e6deb9086afab9d2bdd53db8ecbc7db93af5204d.1764169598.git.michal.simek@amd.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
This commit is contained in:
Padmarao Begari 2025-11-26 16:06:41 +01:00 committed by Neil Armstrong
parent 437ea9f8be
commit 080b4f0995

View File

@ -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) {