Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.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>

authored by

Damien Le Moal and committed by
Martin K. Petersen
7e6b7e74 f17c599a

+3 -4
+3 -4
drivers/scsi/pm8001/pm8001_hwi.c
··· 3700 3700 mb(); 3701 3701 3702 3702 if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) { 3703 - pm8001_tag_free(pm8001_ha, tag); 3704 3703 sas_free_task(t); 3705 - /* clear the flag */ 3706 - pm8001_dev->id &= 0xBFFFFFFF; 3707 - } else 3704 + pm8001_dev->id &= ~NCQ_ABORT_ALL_FLAG; 3705 + } else { 3708 3706 t->task_done(t); 3707 + } 3709 3708 3710 3709 return 0; 3711 3710 }