Re: [PATCH v2] ufs: core: fix ufshcd_abort_all racing issue

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

 



>   struct ufs_hw_queue *ufshcd_mcq_req_to_hwq(struct ufs_hba *hba,
>    struct request *req)
>   {
> -u32 utag = blk_mq_unique_tag(req);
> -u32 hwq = blk_mq_unique_tag_to_hwq(utag);
> +struct blk_mq_hw_ctx *hctx = READ_ONCE(rq->mq_hctx);
> 
> -return &hba->uhq[hwq];
> +return hctx ? &hba->uhq[hctx->queue_num] : NULL;
>   }
> 

Hi Bart,

Yes, it could be work, thanks.

>   /**
> @@ -547,6 +546,8 @@ int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba,
> int 
> task_tag)
>   if (!cmd)
>   return -EINVAL;
>   hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd));
> +if (!hwq)
> +return -EINVAL;
> 

Should retrun 0, beacuse hwq null means tag is done by ISR.
We don't need cleanup sq now.


Thanks.
Peter



>   } else {
>   hwq = hba->dev_cmd_queue;
>   }
> 




[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