Re: [PATCH 2/2] scsi: ufs: core: Set the residual byte count

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

 



On 14/03/23 22:58, Bart Van Assche wrote:
> It is important for the SCSI core to know the residual byte count.
> Hence, extract the residual byte count from the UFS response and pass it to
> the SCSI core. A few examples of the output of a debugging patch that has
> been applied on top of this patch:
> 
> [    1.937750] cmd 0x12: len = 255; resid = 241
> [ ... ]
> [    1.993400] cmd 0xa0: len = 4096; resid = 4048
> [ ... ]

Should this be a fix for stable?

> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/ufs/core/ufshcd.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index ce7b765aa2af..7bbbae9c7c61 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5238,6 +5238,9 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
>  	int scsi_status;
>  	enum utp_ocs ocs;
>  
> +	scsi_set_resid(lrbp->cmd,
> +		be32_to_cpu(lrbp->ucd_rsp_ptr->sr.residual_transfer_count));
> +
>  	/* overall command status of utrd */
>  	ocs = ufshcd_get_tr_ocs(lrbp, cqe);
>  




[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