IB/srp: allow task management without a previous request
authorDavid Dillow <dillowda@ornl.gov>
Fri, 26 Nov 2010 18:02:21 +0000 (13:02 -0500)
committerDavid Dillow <dillowda@ornl.gov>
Wed, 5 Jan 2011 20:24:25 +0000 (15:24 -0500)
commitf8b6e31e4e46bf514c27fce38783ed5615cca01d
tree0ae9afcb65749e36034b6de03abe5fd51c5dc7b0
parent3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5
IB/srp: allow task management without a previous request

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
Reported-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: David Dillow <dillowda@ornl.gov>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h