forked from Minki/linux
scsi: ufs: Fix illegal offset in UPIU event trace
Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace().
Link: https://lore.kernel.org/r/20210924085848.25500-1-jonathan.hsu@mediatek.com
Fixes: 4b42d557a8
("scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs")
Cc: stable@vger.kernel.org
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jonathan Hsu <jonathan.hsu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
fbdac19e64
commit
e8c2da7e32
@ -318,8 +318,7 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
|
||||
static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
|
||||
enum ufs_trace_str_t str_t)
|
||||
{
|
||||
int off = (int)tag - hba->nutrs;
|
||||
struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off];
|
||||
struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[tag];
|
||||
|
||||
if (!trace_ufshcd_upiu_enabled())
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user