Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfd76736 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

scsi: ufs: fix issue with scaling up gear



Commit <be096037> ("scsi: ufs: scale up the gear in 2 steps") introduced
a bug where we would not scale up the gear to HS-G3 if
UFS_DEVICE_QUIRK_HS_G1_TO_HS_G3_SWITCH quirk isn't enabled for UFS device.
Fix this by allowing HS-G3 scaling irrespective of quirk state.

Change-Id: Id6a958fb2908ae773283bcdd3dc871292e56f4ce
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 13ce0881
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -9415,10 +9415,11 @@ static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up)
			/* scale up to G3 now */
			new_pwr_info.gear_tx = UFS_HS_G3;
			new_pwr_info.gear_rx = UFS_HS_G3;
			/* now, fall through to set the HS-G3 */
		}
		ret = ufshcd_change_power_mode(hba, &new_pwr_info);
		if (ret)
			goto out;
		}
	} else {
		memcpy(&new_pwr_info, &hba->pwr_info,
		       sizeof(struct ufs_pa_layer_attr));