Re: [PATCH v1] ufs: core: Remove unnecessary block I/O quiesce for clock scaling

Shawn Guo <[email protected]>
Newsgroups org.infradead.lists.linux-mediatek,org.kernel.vger.linux-scsi
Message-ID <al8YkXydXJQZrl_Y@QCOM-aGQu4IUr3Y>
On Thu, Jun 04, 2026 at 09:33:58PM +0800, [email protected] wrote:
> From: Peter Wang <[email protected]>
> 
> According to the MIPI UniPro Specification v2.0:
> 
> 5.3.2.3 PA_DL_PAUSE.ind
> This primitive informs the PA Service User, the DL Layer in
> this case, that the PA Layer was requested to execute a
> operation that requires the usage of the Link, e.g. Power
> Mode change or PACP frame transmission.
> 
> 5.3.2.4 PA_DL_PAUSE.rsp_L
> This primitive informs the Service Provider that the PA
> Service User, the DL Layer in this case, has reached
> a state where the Link may be used by the PA Layer.
> 
> 5.3.2.5 PA_DL_RESUME.ind
> This primitive informs the PA Service User, the DL Layer
> in this case, that the PA Layer has completed its operation
> and the DL Layer may continue to use the Link.
> 
> The detailed flow can be found in Figure 52:
> Power Mode Change Using PACP_PWR_req and PACP_PWR_cnf.
> 
> In short, when the PA layer do power mode change:
> 1. The DL layer receives PA_DL_PAUSE.ind.
> 2. The DL layer stops and responds to the PA layer with PA_DL_PAUSE.rsp_L.
> 3. Waits until the PA layer has completed its work.
> 4. The PA layer then informs the DL layer with PA_DL_RESUME.ind.
> 
> Hence, it is not necessary to stop I/O during a power mode change,
> and this step can be removed.
> 
> Signed-off-by: Peter Wang <[email protected]>

I'm testing linux-next on a Qualcomm platform. UFS worked fine on
next-20260713 and got a regression on next-20260720 like:

[   36.243001] ufshcd-qcom 1d44000.ufshc: ufshcd_abort: Device abort task at tag 48
[   36.250616] sd 0:0:0:5: [sdf] tag#48 CDB: opcode=0x28 28 00 00 02 5f 32 00 00 10 00
[   36.258521] host_regs: 00000000: d5c7033f 20e0071f 00000400 00000000
[   36.265065] host_regs: 00000010: 01000000 00010217 00000c96 00000000
[   36.271607] host_regs: 00000020: 00000000 00371af5 00000000 00000000
[   36.278146] host_regs: 00000030: 0000010f 00000003 00000000 00000000
[   36.284688] host_regs: 00000040: 00000000 00000000 00000000 00000000
[   36.291229] host_regs: 00000050: fffdf000 0000000f 00000000 00000000
[   36.297775] host_regs: 00000060: 00000001 00000000 00000000 00000000
[   36.304317] host_regs: 00000070: fffde000 0000000f 00000000 00000000
[   36.310860] host_regs: 00000080: 00000001 00000000 00000000 00000000
[   36.317403] host_regs: 00000090: 00000002 15710000 00000000 00000004
[   36.323939] ufshcd-qcom 1d44000.ufshc: No record of pa_err
[   36.329595] ufshcd-qcom 1d44000.ufshc: No record of dl_err
[   36.335237] ufshcd-qcom 1d44000.ufshc: No record of nl_err
[   36.340878] ufshcd-qcom 1d44000.ufshc: No record of tl_err
[   36.346523] ufshcd-qcom 1d44000.ufshc: No record of dme_err
[   36.352252] ufshcd-qcom 1d44000.ufshc: No record of auto_hibern8_err
[   36.358790] ufshcd-qcom 1d44000.ufshc: No record of fatal_err
[   36.364701] ufshcd-qcom 1d44000.ufshc: No record of link_startup_fail
[   36.371332] ufshcd-qcom 1d44000.ufshc: No record of resume_fail
[   36.377428] ufshcd-qcom 1d44000.ufshc: No record of suspend_fail
[   36.383603] ufshcd-qcom 1d44000.ufshc: No record of wlun resume_fail
[   36.390142] ufshcd-qcom 1d44000.ufshc: No record of wlun suspend_fail
[   36.396769] ufshcd-qcom 1d44000.ufshc: dev_reset[0] = 0x0 at 3853838 us
[   36.403575] ufshcd-qcom 1d44000.ufshc: dev_reset: total cnt=1
[   36.409482] ufshcd-qcom 1d44000.ufshc: No record of host_reset
[   36.415478] ufshcd-qcom 1d44000.ufshc: task_abort[0] = 0x30 at 36258488 us
[   36.422546] ufshcd-qcom 1d44000.ufshc: task_abort: total cnt=1
[   36.428550] ufshcd-qcom 1d44000.ufshc: HW_H8_ENTER_CNT=2
[   36.434015] ufshcd-qcom 1d44000.ufshc: HW_H8_EXIT_CNT=1
[   36.439393] ufshcd-qcom 1d44000.ufshc: SW_H8_ENTER_CNT=3
[   36.444861] ufshcd-qcom 1d44000.ufshc: SW_H8_EXIT_CNT=4
[   36.450239] ufshcd-qcom 1d44000.ufshc: SW_AFTER_HW_H8_ENTER_CNT=1
[   36.456526] HCI Vendor Specific Registers 00000000: 00000193 00000000 00000000 00000000
[   36.464758] HCI Vendor Specific Registers 00000010: 002aaa52 00000000 00000001 1c00052c
[   36.472987] HCI Vendor Specific Registers 00000020: 1b0113ff 60020000 00000000 00000000
[   36.481216] HCI Vendor Specific Registers 00000030: 00000000 00000000 00000000 0000183c
[   36.489481] UFS_UFS_DBG_RD_REG_OCSC 00000000: 00000000 00000000 00000000 00000000
[   36.497175] UFS_UFS_DBG_RD_REG_OCSC 00000010: 00000000 00000000 00000000 00000000
[   36.504867] UFS_UFS_DBG_RD_REG_OCSC 00000020: 00000000 00000000 00000000 00000000
[   36.512558] UFS_UFS_DBG_RD_REG_OCSC 00000030: 00000000 00000013 00000000 00000000
...

A revert of commit 85b2b9662854 ("scsi: ufs: core: Remove unnecessary
block I/O quiesce for clock scaling") fixes the regression for me.

Shawn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.