cmd pending in the device or no response from device when a UFS device issue occurs. For more information, reach out to the UFS device vendor.
Example 1:
Physical adapter or data link error
In the kernel log,pa_err_cnt_total and dl_err_cnt_total with nonzero values indicate a physical adapter or data link (PA/DL) error issue. This issue occurs when the signal quality between the AP and the UFS device isn’t strong, and requires modification in all three components, such as hardware, software, and the UFS device vendor to resolve.
To view the PA/DL error count, use the debugfs path /sys/kernel/debug/ufshcd/1d84000.ufshc/stats.
Mount debugfs using the following command. This command ensures that the debugfs file system remains accessible for the debug nodes.
Active state UFS device power consumption issue
Use the following steps to debug UFS device high power consumption during active state.-
Check how often the issue occurs. Use the following SSH command to check current clock frequency.
If the frequency is maximum, skip to Step 3.
- Check whether any UFS device-related feature (such as WriteBooster) is enabled.
-
Check whether clock scale is disabled.
-
Monitor the UFS device clocks frequency and UFS device rails.
The issue may occur due to an initial setting or an unexpected
devfreqevent.
Sleep state power consumption issue
During sleep state, if UFS device power consumption is high, use the following steps to debug UFS device suspend-related issues.-
Check the power management state using sysfs nodes
link_state,cur_freq, andruntime_statusand PM level (PM_LVL3 has higher power consumption than 5). -
Check the UFS device state using sysfs node
dev_pmto determine whether UFS device is in sleep mode. - Check whether the HPB and write booster features are enabled because they cause high power consumption.
- Check the UFS device VCC/VCCQ/VCCQ2 timing from the hardware side if an issue occurs.
Unhandled UFS device SMMU issue
System memory management Unit (SMMU) is a memory management unit (MMU) that connects a direct-memory-access-capable (DMA-capable) I/O bus to the physical memory. Each device is assigned a unique stream ID (SID). The UFS device controller SID value is 0x80. For unhandled SMMU fault from UFS device SMMU, disable the UFS device SMMU.ufshc_mem node that is typically within the SOC DTSI file. For example, <workspace_root_path>/sources/kernel/kernel_platform/kernel/arch/arm64/boot/dts/qcom/sc7280.dtsi file.

