Commit 093beac1 authored by Ishai Rabinovitz's avatar Ishai Rabinovitz Committed by Roland Dreier

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: default avatarIshai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ec2d7208
...@@ -1241,7 +1241,7 @@ static int srp_reset_device(struct scsi_cmnd *scmnd) ...@@ -1241,7 +1241,7 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
list_for_each_entry_safe(req, tmp, &target->req_queue, list) list_for_each_entry_safe(req, tmp, &target->req_queue, list)
if (req->scmnd->device == scmnd->device) { if (req->scmnd->device == scmnd->device) {
req->scmnd->result = DID_RESET << 16; req->scmnd->result = DID_RESET << 16;
scmnd->scsi_done(scmnd); req->scmnd->scsi_done(req->scmnd);
srp_remove_req(target, req); srp_remove_req(target, req);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment