diff options
| author | Stanley Jhu <stanleyjhu@google.com> | 2026-10-29 15:08:38 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-11-04 22:22:27 -0500 |
| commit | 93891d1c486efcef2267c32e6e73ca2fd243704e (patch) | |
| tree | feebc31969d24de09586a8007a3ea2838e12b662 /tools/perf/scripts/python | |
| parent | cbab12e5b4a7f49d5add4301de275351269cd431 (diff) | |
scsi: ufs: sysfs: Propagate runtime PM resume errors
All 14 ufshcd_rpm_get_sync() callers in ufs-sysfs.c resume the UFS device
W-LUN and ignore the return value. For example, for a UFS descriptor read:
1. The W-LUN is runtime suspended.
2. User space reads a UFS descriptor attribute in sysfs.
3. ufs_sysfs_read_desc_param() calls ufshcd_rpm_get_sync().
4. The W-LUN runtime resume fails and the W-LUN stays suspended.
5. ufshcd_rpm_get_sync() returns a negative errno, which is ignored.
6. ufs_sysfs_read_desc_param() sends a query UPIU while the W-LUN is
still suspended.
The other sysfs callers follow the same sequence. They send other query
UPIUs, or read a host register in ufshcd_read_hci_reg().
Switch all 14 sysfs callers to ufshcd_rpm_resume_and_get() and return the
error after releasing any held buffer and hba->host_sem.
Fixes: aef80fd1da32 ("scsi: ufs: sysfs: Resume the proper SCSI device")
Fixes: b9d104465a6c ("scsi: ufs: Prepare to add HCI capabilities sysfs")
Fixes: 600edc6620a4 ("scsi: ufs: sysfs: Make max_number_of_rtt read-write")
Fixes: 6c4148ce7cc1 ("scsi: ufs: wb: Add explicit flush sysfs attribute")
Fixes: 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support")
Fixes: ae7795a8c258 ("scsi: ufs: core: Add HID support")
Fixes: 1fd2e77b8897 ("scsi: ufs: core: Add device level exception support")
Cc: stable@vger.kernel.org # needs "scsi: ufs: core: Introduce ufshcd_rpm_resume_and_get() helper"
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20261029040003.2100003-4-stanleyjhu@google.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
