linux/drivers/infiniband/ulp
Bart Van Assche c7c4e7ff80 IB/srp: Avoid endless SCSI error handling loop
If a SCSI command times out it is passed to the SCSI error
handler. The SCSI error handler will try to abort the commands that
timed out.  If aborting fails, a device reset will be attempted.  If
the device reset also fails a host reset will be attempted.  If the
host reset also fails the whole procedure will be repeated.

srp_abort() and srp_reset_device() fail for a QP in the error state.
srp_reset_host() fails after host removal has started.  Hence if the
SCSI error handler gets invoked after host removal has started and
with the QP in the error state an endless loop will be triggered.

Modify the SCSI error handling functions in ib_srp as follows:
- Abort SCSI commands properly even if the QP is in the error state.
- Make srp_reset_host() reset SCSI requests even after host removal
  has already started or if reconnecting fails.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: David Dillow <dave@thedillows.org>
Cc: <stable@vger.kernel.org> # 3.8
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-02-25 09:31:14 -08:00
..
ipoib IPoIB: Fix crash due to skb double destruct 2013-02-05 09:35:06 -08:00
iser IB/iser: Add more RX CQs to scale out processing of SCSI responses 2012-10-03 21:26:49 -07:00
srp IB/srp: Avoid endless SCSI error handling loop 2013-02-25 09:31:14 -08:00
srpt ib_srpt: Convert TMR path to target_submit_tmr 2012-11-28 11:20:28 -08:00