[PATCH V2 6/6] scsi: ufs: host : Introduce phy_power_on/off wrapper function
Bart Van Assche
bvanassche at acm.org
Tue Mar 18 10:46:32 PDT 2025
On 3/18/25 7:49 AM, Nitin Rawat wrote:
Just like the other patches in this series, the subject of this patch
should have the prefix "scsi: ufs: qcom:" instead of "scsi: ufs: host:"
> diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h
> index d0e6ec9128e7..3db29fbcd40b 100644
> --- a/drivers/ufs/host/ufs-qcom.h
> +++ b/drivers/ufs/host/ufs-qcom.h
> @@ -252,6 +252,10 @@ struct ufs_qcom_host {
> u32 phy_gear;
>
> bool esi_enabled;
> + /* flag to check if phy is powered on */
> + bool is_phy_pwr_on;
> + /* Protect the usage of is_phy_pwr_on against racing */
> + struct mutex phy_mutex;
> };
Please reorder the above two structure members. Synchronization objects
should occur before the data members protected by these synchronization
objects in structure definitions.
It seems to me that phy_mutex not only serializes is_phy_pwr_on accesses
but that it also serializes phy_power_on() / phy_power_off() calls. If
this is the case, please mention this.
Thanks,
Bart.
More information about the linux-phy
mailing list