]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: ufs: core: Add device level exception support
authorBao D. Nguyen <quic_nguyenb@quicinc.com>
Fri, 28 Mar 2025 21:46:13 +0000 (14:46 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 3 Apr 2025 14:54:31 +0000 (10:54 -0400)
commit1fd2e77b889761d9bde0c580518689d1d8e83117
treed0ede1b539fa1e903f3137d063fc6cf7e459a199
parentbdab40480b146e2f37f4c7164cb47f526e77ee6d
scsi: ufs: core: Add device level exception support

The ufs device JEDEC specification version 4.1 adds support for the
device level exception events. To support this new device level
exception feature, expose two new sysfs nodes below to provide the user
space access to the device level exception information.

/sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_count
/sys/bus/platform/drivers/ufshcd/*/device_lvl_exception_id

The device_lvl_exception_count sysfs node reports the number of device
level exceptions that have occurred since the last time this variable is
reset. Writing a value of 0 will reset it.  The device_lvl_exception_id
reports the exception ID which is the qDeviceLevelExceptionID attribute
of the device JEDEC specifications version 4.1 and later. The user space
application can query these sysfs nodes to get more information about
the device level exception.

Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Link: https://lore.kernel.org/r/6278d7c125b2f0cf5056f4a647a4b9c1fdd24fc7.1743198325.git.quic_nguyenb@quicinc.com
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Arthur Simchaev <arthur.simchaev@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Documentation/ABI/testing/sysfs-driver-ufs
drivers/ufs/core/ufs-sysfs.c
drivers/ufs/core/ufshcd-priv.h
drivers/ufs/core/ufshcd.c
include/ufs/ufs.h
include/ufs/ufshcd.h