Re: [PATCH]ib_srpt: always set response for task manamgement

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

 



Hi Jack,

On Mon, 2013-09-30 at 10:22 +0200, Jack Wang wrote:
> Hi
> 
> 
> From b22674ba7daae24da4206ed6215cc802a97d6e1c Mon Sep 17 00:00:00 2001
> From: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx>
> Date: Mon, 30 Sep 2013 10:09:05 +0200
> Subject: [PATCH] ib_srpt: always set response for task management
> 
> SRP spec require:
> "
> Response data shall be provided in any SRP_RSP response that is sent in
> response to an SRP_TSK_MGMT
> request (see 6.7). The information in the RSP_CODE field (see table 24)
> shall indicate the completion status of
> the task management function.
> "
> So fix this to avoid the SRP initiator interprets task management functions
> that succeeded as failed.
> 
> Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx>
> ---

Applied, and adding a CC' to stable here as well.

Thanks!

--nab

>  drivers/infiniband/ulp/srpt/ib_srpt.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c
> b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 653ac6b..cb1e9c1 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1588,7 +1588,7 @@ static int srpt_build_tskmgmt_rsp(struct
> srpt_rdma_ch *ch,
>  	int resp_data_len;
>  	int resp_len;
> 
> -	resp_data_len = (rsp_code == SRP_TSK_MGMT_SUCCESS) ? 0 : 4;
> +	resp_data_len = 4;
>  	resp_len = sizeof(*srp_rsp) + resp_data_len;
> 
>  	srp_rsp = ioctx->ioctx.buf;
> @@ -1600,11 +1600,9 @@ static int srpt_build_tskmgmt_rsp(struct
> srpt_rdma_ch *ch,
>  				    + atomic_xchg(&ch->req_lim_delta, 0));
>  	srp_rsp->tag = tag;
> 
> -	if (rsp_code != SRP_TSK_MGMT_SUCCESS) {
> -		srp_rsp->flags |= SRP_RSP_FLAG_RSPVALID;
> -		srp_rsp->resp_data_len = cpu_to_be32(resp_data_len);
> -		srp_rsp->data[3] = rsp_code;
> -	}
> +	srp_rsp->flags |= SRP_RSP_FLAG_RSPVALID;
> +	srp_rsp->resp_data_len = cpu_to_be32(resp_data_len);
> +	srp_rsp->data[3] = rsp_code;
> 
>  	return resp_len;
>  }


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux