aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5987da857103..e495d3813948 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -898,7 +898,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
898 scsi_print_sense("", cmd); 898 scsi_print_sense("", cmd);
899 scsi_print_command(cmd); 899 scsi_print_command(cmd);
900 } 900 }
901 if (blk_end_request_err(req, -EIO)) 901 if (blk_end_request_err(req, error))
902 scsi_requeue_command(q, cmd); 902 scsi_requeue_command(q, cmd);
903 else 903 else
904 scsi_next_command(cmd); 904 scsi_next_command(cmd);
@@ -1359,9 +1359,9 @@ static int scsi_lld_busy(struct request_queue *q)
1359static void scsi_kill_request(struct request *req, struct request_queue *q) 1359static void scsi_kill_request(struct request *req, struct request_queue *q)
1360{ 1360{
1361 struct scsi_cmnd *cmd = req->special; 1361 struct scsi_cmnd *cmd = req->special;
1362 struct scsi_device *sdev = cmd->device; 1362 struct scsi_device *sdev;
1363 struct scsi_target *starget = scsi_target(sdev); 1363 struct scsi_target *starget;
1364 struct Scsi_Host *shost = sdev->host; 1364 struct Scsi_Host *shost;
1365 1365
1366 blk_start_request(req); 1366 blk_start_request(req);
1367 1367
@@ -1371,6 +1371,9 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
1371 BUG(); 1371 BUG();
1372 } 1372 }
1373 1373
1374 sdev = cmd->device;
1375 starget = scsi_target(sdev);
1376 shost = sdev->host;
1374 scsi_init_cmd_errh(cmd); 1377 scsi_init_cmd_errh(cmd);
1375 cmd->result = DID_NO_CONNECT << 16; 1378 cmd->result = DID_NO_CONNECT << 16;
1376 atomic_inc(&cmd->device->iorequest_cnt); 1379 atomic_inc(&cmd->device->iorequest_cnt);