[PATCH v3 1/1] scsi: ufs: core: add device level exception support

Peter Wang (王信友) peter.wang at mediatek.com
Wed Mar 19 00:56:31 PDT 2025


On Wed, 2025-03-19 at 00:29 -0700, Bao D. Nguyen wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> 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 at quicinc.com>
> Reviewed-by: Peter Wang <peter.wang at mediatek.com>
> ---
> Changes in v3:
> 1. Add protection for hba->dev_lvl_exception_count accesses in
> different
> contexts (Bart's comment).

Hi Bao,

Could use atomic_t for counter protect?

Thanks.
Peter



More information about the linux-arm-kernel mailing list