lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a918075-627b-4707-94db-cc86b2f7a5e4@quicinc.com>
Date: Mon, 4 Aug 2025 15:54:09 +0800
From: Ziqi Chen <quic_ziqichen@...cinc.com>
To: Bart Van Assche <bvanassche@....org>,
        Peter Wang (王信友) <peter.wang@...iatek.com>,
        "beanhuo@...ron.com" <beanhuo@...ron.com>,
        "avri.altman@....com"
	<avri.altman@....com>,
        "neil.armstrong@...aro.org"
	<neil.armstrong@...aro.org>,
        "quic_cang@...cinc.com" <quic_cang@...cinc.com>,
        "quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>,
        "quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
        "luca.weiss@...rphone.com" <luca.weiss@...rphone.com>,
        "konrad.dybcio@....qualcomm.com" <konrad.dybcio@....qualcomm.com>,
        "mani@...nel.org" <mani@...nel.org>,
        "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>,
        "quic_rampraka@...cinc.com"
	<quic_rampraka@...cinc.com>,
        "junwoo80.lee@...sung.com"
	<junwoo80.lee@...sung.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        Tze-nan Wu (吳澤南) <Tze-nan.Wu@...iatek.com>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] scsi: ufs: core: Don't perform UFS clkscale if host
 asyn scan in progress



On 7/30/2025 11:50 PM, Bart Van Assche wrote:
> On 7/30/25 5:55 AM, Peter Wang (王信友) wrote:
>> Another idea is to only start ufshcd_devfreq_init
>> when shost->async_scan = 0.
> 
> Hmm ... I don't think that this is a solution. There are multiple
> ways for triggering a LUN scan and my understanding is that the
> clock scaling code should be serialized against LUN scanning.
> 
> Here is an example of how LUN scanning can be triggered from user
> space by writing into the 'scan' sysfs attribute, even if
> shost->async_scan = 0:
> 
> echo "- - -" > /sys/class/scsi_host/host.../scan
> 
> Bart.

Hi  Peter && Bart,

How do you think about using

if (!mutex_trylock(&hba->host->scan_mutex))
	return -EAGAIN;

instead of

mutex_lock(&hba->host->scan_mutex);

But this way will cause one line print of devfreq failed.

BRs
Ziqi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ