Message ID | 20170213055432.GM14015@mtr-leonro.local (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Mon, 2017-02-13 at 07:54 +0200, Leon Romanovsky wrote: > I'm sure that I'm missing something, but how would it be triggered? > We will enter to call second srp_claim_req() function only if "req" is > not NULL. > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c > index 79bf48477ddb..40e7f27c40bf 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -1897,10 +1897,12 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp) > complete(&ch->tsk_mgmt_done); > } else { > scmnd = scsi_host_find_tag(target->scsi_host, rsp->tag); > - if (scmnd) { > + if (scmnd && scmnd->host_scribble) { > req = (void *)scmnd->host_scribble; > scmnd = srp_claim_req(ch, req, NULL, scmnd); > } > + else > + scnmnd = NULL; > if (!scmnd) { > shost_printk(KERN_ERR, target->scsi_host, > "Null scmnd for RSP w/tag %#016llx received on ch %td / QP %#x\n", Hello Leon, Sorry but I had misread your previous e-mail. I agree that the above should work fine. Bart.-- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 79bf48477ddb..40e7f27c40bf 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1897,10 +1897,12 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp) complete(&ch->tsk_mgmt_done); } else { scmnd = scsi_host_find_tag(target->scsi_host, rsp->tag); - if (scmnd) { + if (scmnd && scmnd->host_scribble) { req = (void *)scmnd->host_scribble; scmnd = srp_claim_req(ch, req, NULL, scmnd); } + else + scnmnd = NULL; if (!scmnd) { shost_printk(KERN_ERR, target->scsi_host, "Null scmnd for RSP w/tag %#016llx received on ch %td / QP %#x\n",