From: Ishai Rabinovitz Date: Wed, 17 May 2006 16:20:48 +0000 (-0700) Subject: IB/srp: Complete correct SCSI commands on device reset X-Git-Tag: v2.6.17-rc5~90^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=093beac189e4295d968f0d38787b46f76cb0eaaa;p=linux-2.6 IB/srp: Complete correct SCSI commands on device reset When flushing out queued commands after a successful device reset, make sure that SRP completes the right commands, instead of calling scsi_done on the command passed into the device reset handler over and over. Signed-off-by: Ishai Rabinovitz Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 0f24f04cb6..9cbdffa08d 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1241,7 +1241,7 @@ static int srp_reset_device(struct scsi_cmnd *scmnd) list_for_each_entry_safe(req, tmp, &target->req_queue, list) if (req->scmnd->device == scmnd->device) { req->scmnd->result = DID_RESET << 16; - scmnd->scsi_done(scmnd); + req->scmnd->scsi_done(req->scmnd); srp_remove_req(target, req); }