Re: [PATCH v4 19/31] scsi: pm8001: Fix pm8001_mpi_task_abort_resp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 17, 2022 at 2:30 PM Damien Le Moal
<damien.lemoal@xxxxxxxxxxxxxxxxxx> wrote:
>
> 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.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> ---
>  drivers/scsi/pm8001/pm8001_hwi.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index 35d62e5c9200..5cad5504301e 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -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;
>  }
> --
> 2.34.1
>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux