[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fd13e179-f2d8-4085-86da-c6b0fce2de5b@acm.org>
Date: Thu, 8 May 2025 09:06:27 -0700
From: Bart Van Assche <bvanassche@....org>
To: Ziqi Chen <quic_ziqichen@...cinc.com>, quic_cang@...cinc.com,
mani@...nel.org, beanhuo@...ron.com, avri.altman@....com,
junwoo80.lee@...sung.com, martin.petersen@...cle.com,
quic_nguyenb@...cinc.com, quic_nitirawa@...cinc.com,
quic_rampraka@...cinc.com, neil.armstrong@...aro.org,
luca.weiss@...rphone.com, konrad.dybcio@....qualcomm.com,
peter.wang@...iatek.com
Cc: linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] scsi: ufs: core: skip UFS clkscale if host
asynchronous scan in progress
On 5/8/25 2:38 AM, Ziqi Chen wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 1c53ccf5a616..04f40677e76a 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -1207,6 +1207,9 @@ static bool ufshcd_is_devfreq_scaling_required(struct ufs_hba *hba,
> if (list_empty(head))
> return false;
>
> + if (hba->host->async_scan)
> + return false;
Testing a boolean is never a proper way to synchronize code sections.
As an example, the SCSI core could set hba->host->async_scan after this
check completed and before the code below is executed. I think we need a
better solution.
Bart.
Powered by blists - more mailing lists