Skip to content

Commit ece79aa

Browse files
Damien Le Moalgregkh
authored andcommitted
scsi: pm8001: Fix pm8001_mpi_task_abort_resp()
[ Upstream commit 7e6b7e7 ] The call to pm8001_ccb_task_free() at the end of pm8001_mpi_task_abort_resp() already frees the ccb tag. So when the device NCQ_ABORT_ALL_FLAG is set, the tag should not be freed again. Also change the hardcoded 0xBFFFFFFF value to ~NCQ_ABORT_ALL_FLAG as it ought to be. Link: https://lore.kernel.org/r/20220220031810.738362-19-damien.lemoal@opensource.wdc.com Reviewed-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5e4ac14 commit ece79aa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/scsi/pm8001/pm8001_hwi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3713,12 +3713,11 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
37133713
mb();
37143714

37153715
if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) {
3716-
pm8001_tag_free(pm8001_ha, tag);
37173716
sas_free_task(t);
3718-
/* clear the flag */
3719-
pm8001_dev->id &= 0xBFFFFFFF;
3720-
} else
3717+
pm8001_dev->id &= ~NCQ_ABORT_ALL_FLAG;
3718+
} else {
37213719
t->task_done(t);
3720+
}
37223721

37233722
return 0;
37243723
}

0 commit comments

Comments
 (0)