On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <[email protected]> wrote: > > We can only have one task management comment outstanding, so move the > completion and status to the target port. This allows us to handle > resets of a LUN without a corresponding request having been sent. > Meanwhile, we don't need to play games with host_scribble, just use it > as the pointer it is. > > This fixes a crash when we issue a bus reset using sg_reset. > > Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=13893 > Signed-off-by: David Dillow <[email protected]>
You can add here "Reported-by: Bart Van Assche <[email protected]>" if you want. > diff --git a/drivers/infiniband/ulp/srp/ib_srp.h > b/drivers/infiniband/ulp/srp/ib_srp.h > index ed0dce9..c923731 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.h > +++ b/drivers/infiniband/ulp/srp/ib_srp.h > @@ -68,7 +68,8 @@ enum { > SRP_TSK_MGMT_SQ_SIZE = 1, > SRP_CMD_SQ_SIZE = SRP_REQ_SQ_SIZE - SRP_TSK_MGMT_SQ_SIZE, > > - SRP_TAG_TSK_MGMT = 1 << (SRP_RQ_SHIFT + 1), > + SRP_TAG_NO_REQ = ~0UL, > + SRP_TAG_TSK_MGMT = 1UL << 31, According to ANSI C, enumeration types have the same size as an int, so the above two declarations will assign a long to an int. The types long and int do not need to have the same size, so I suggest to leave out the capital L in the above. And checkpatch says this: WARNING: please, no space before tabs #114: FILE: drivers/infiniband/ulp/srp/ib_srp.c:1462: +^Itsk_mgmt->lun ^I^I= cpu_to_be64((u64) lun << 48);$ WARNING: please, no space before tabs #115: FILE: drivers/infiniband/ulp/srp/ib_srp.c:1463: +^Itsk_mgmt->tag ^I^I= req_tag | SRP_TAG_TSK_MGMT;$ WARNING: please, no space before tabs #118: FILE: drivers/infiniband/ulp/srp/ib_srp.c:1465: +^Itsk_mgmt->task_tag ^I= req_tag;$ total: 0 errors, 3 warnings, 211 lines checked Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
