scsi: ufs: qcom: Clarify comments about the initial phy_gear
authorAndrew Halaney <ahalaney@redhat.com>
Tue, 23 Jan 2024 19:13:36 +0000 (13:13 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 25 Jan 2024 02:33:54 +0000 (21:33 -0500)
commit883a8b451cf4c659d5bba0becfc3780394b597c8
tree0c9d14b80c1abd1044a57bf1301f14bde76b20eb
parent2b9bc9efa815f7264158007ad3f77cb6359c15ff
scsi: ufs: qcom: Clarify comments about the initial phy_gear

The comments that currently are within the hw_ver < 4 conditional are
misleading. They really apply to various branches of the conditionals there
and incorrectly state that the phy_gear value can increase.

Right now the logic is to:

 - Default to max supported gear for phy_gear

 - Set phy_gear to minimum value if version < 4 since those versions only
   support one PHY init sequence (and therefore don't need reinit)

 - Set phy_gear to the optimal value if the device version is already
   populated in the controller registers on boot

Let's move some of the comment to outside the if statement and clean up the
bit left about switching to a higher gear on reinit. This way the comment
more accurately reflects the logic.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20240123-ufs-reinit-comments-v1-1-ff2b3532d7fe@redhat.com
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c