提交 7e6b7e74 编写于 作者: D Damien Le Moal 提交者: Martin K. Petersen

scsi: pm8001: Fix pm8001_mpi_task_abort_resp()

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.comReviewed-by: NJack Wang <jinpu.wang@ionos.com>
Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 f17c599a
......@@ -3700,12 +3700,11 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
mb();
if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) {
pm8001_tag_free(pm8001_ha, tag);
sas_free_task(t);
/* clear the flag */
pm8001_dev->id &= 0xBFFFFFFF;
} else
pm8001_dev->id &= ~NCQ_ABORT_ALL_FLAG;
} else {
t->task_done(t);
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册