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 <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Ishai Rabinovitz 2006-05-17 09:20:48 -07:00 committed by Roland Dreier
parent ec2d720849
commit 093beac189

View file

@ -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);
}