Re: [PATCH] RDMA/srpt: Report the SCSI residual to the initiator

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

 



On Tue, Oct 29, 2019 at 04:02:57PM -0700, Bart Van Assche wrote:
> The code added by this patch is similar to the code that already exists
> in ibmvscsis_determine_resid(). This patch has been tested by running
> the following command:
> 
> strace -f sg_raw -r 1k /dev/sdb 12 00 00 00 60 00 -o inquiry.bin |&
>     grep resid=
> 
> Cc: Honggang LI <honli@xxxxxxxxxx>
> Cc: Laurence Oberman <loberman@xxxxxxxxxx>
> Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index a278e76b9e02..c9972b686c27 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1362,9 +1362,11 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch,
>  			      struct srpt_send_ioctx *ioctx, u64 tag,
>  			      int status)
>  {
> +	struct se_cmd *cmd = &ioctx->cmd;
>  	struct srp_rsp *srp_rsp;
>  	const u8 *sense_data;
>  	int sense_data_len, max_sense_len;
> +	int resid = cmd->residual_count;
        ^^^
Should be u32?	





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux