IB/srp: Avoid offlining operational SCSI devices
authorBart Van Assche <bvanassche@acm.org>
Thu, 10 Oct 2013 11:52:33 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:24 +0000 (11:05 -0800)
commit748d2db3a5aced2d40dbb884450efbb843fd5e50
treebaff7ab7f934bed80d107e87df5610b85859f287
parenta3ecf3cc3ba14a603642d60af8c8e80798d1d492
IB/srp: Avoid offlining operational SCSI devices

commit 99b6697a50c2acbe3ca2772d359fc9a28835dc84 upstream.

If SCSI commands are submitted with a SCSI request timeout that is
lower than the the IB RC timeout, it can happen that the SCSI error
handler has already started device recovery before transport layer
error handling starts.  So it can happen that the SCSI error handler
tries to abort a SCSI command after it has been reset by
srp_rport_reconnect().

Tell the SCSI error handler that such commands have finished and that
it is not necessary to continue its recovery strategy for commands
that have been reset by srp_rport_reconnect().

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srp/ib_srp.c