Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ishai Rabinovitz and committed by
Roland Dreier
093beac1 ec2d7208

+1 -1
+1 -1
drivers/infiniband/ulp/srp/ib_srp.c
··· 1241 1241 list_for_each_entry_safe(req, tmp, &target->req_queue, list) 1242 1242 if (req->scmnd->device == scmnd->device) { 1243 1243 req->scmnd->result = DID_RESET << 16; 1244 - scmnd->scsi_done(scmnd); 1244 + req->scmnd->scsi_done(req->scmnd); 1245 1245 srp_remove_req(target, req); 1246 1246 } 1247 1247