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] [day] [month] [year] [list]
Message-ID: <e3e79ac7edc24f17db4a6210c854bb374a0744fb.camel@mediatek.com>
Date: Wed, 19 Nov 2025 09:20:27 +0000
From: Peter Wang (王信友) <peter.wang@...iatek.com>
To: "sh043.lee@...sung.com" <sh043.lee@...sung.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"bvanassche@....org" <bvanassche@....org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>
Subject: Re: [PATCH] UFS: Make TM command timeout configurable from host side

On Tue, 2025-11-18 at 09:31 -0800, Bart Van Assche wrote:
> On 11/17/25 9:55 PM, Peter Wang (王信友) wrote:
> > However, in extreme cases, it’s possible that after a 30-second
> > timeout, the device just send a response, and at the same time,
> > when the host receives the response, the IRQ is pending by system.
> > (other irq is executing or spin_lock_irq, etc)
> 
> It is not clear to me how this could happen? If a response is not
> received in time from the UFS device, an abort TMF is sent. If the
> device does not respond to the abort TMF, the UFS device is reset
> (ufshcd_device_reset() is called if ufshcd_abort_all() fails). This
> prevents that a response can be received after the error handler has
> finished, isn't it?
> 
> Thanks,
> 
> Bart.

Hi Bart,

The UFS device might take 30 seconds to send read/write 
response, and at the same time, the host sends a TM command
to query this read/write task. In this case, host will receive
the device’s TM response: UPIU_TASK_MANAGEMENT_FUNC_COMPL.

However, if the IRQ is disabled when the read/write response 
arrives, the host may not be able to process the response in 
time. Therefore, we need this loop to wait until the host IRQ
is enabled and to clear the inflight command.

Thanks
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ