[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfe4b18f-aa09-4b1b-89fb-1cb0cc0a78ed@acm.org>
Date: Tue, 27 May 2025 14:24:44 -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 v4] scsi: ufs: core: Don't perform UFS clkscale if host
asyn scan in progress
On 5/22/25 1:12 AM, Ziqi Chen wrote:
> When preparing for UFS clock scaling, the UFS driver will quiesce all sdevs
> queues in the UFS SCSI host tagset list and then unquiesce them when UFS
> clock scaling unpreparing. If the UFS SCSI host async scan is in progress
> at this time, some LUs may be added to the tagset list between UFS clkscale
> prepare and unprepare. This can cause two issues:
>
> 1. During clock scaling, there may be IO requests issued through new added
> queues that have not been quiesced, leading to task abort issue.
>
> 2. These new added queues that have not been quiesced will be unquiesced as
> well when UFS clkscale is unprepared, resulting in warning prints.
>
> Therefore, use the mutex lock scan_mutex in ufshcd_clock_scaling_prepare()
> and ufshcd_clock_scaling_unprepare() to protect it.
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists