[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adb6f7cb-36b1-47d8-8fa1-00fcf5242699@acm.org>
Date: Tue, 18 Mar 2025 10:46:32 -0700
From: Bart Van Assche <bvanassche@....org>
To: Nitin Rawat <quic_nitirawa@...cinc.com>, vkoul@...nel.org,
kishon@...nel.org, manivannan.sadhasivam@...aro.org,
James.Bottomley@...senPartnership.com, martin.petersen@...cle.com,
konrad.dybcio@....qualcomm.com
Cc: quic_rdwivedi@...cinc.com, linux-arm-msm@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, Can Guo <quic_cang@...cinc.com>
Subject: Re: [PATCH V2 6/6] scsi: ufs: host : Introduce phy_power_on/off
wrapper function
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.
Powered by blists - more mailing lists