aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/aha152x.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index dc7d84bae96b..d7ca86f9d1f2 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -1022,6 +1022,14 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
1022 SCp.buffer : next buffer 1022 SCp.buffer : next buffer
1023 SCp.buffers_residual : left buffers in list 1023 SCp.buffers_residual : left buffers in list
1024 SCp.phase : current state of the command */ 1024 SCp.phase : current state of the command */
1025
1026 if(phase & resetting) {
1027 SCpnt->SCp.ptr = NULL;
1028 SCpnt->SCp.this_residual = 0;
1029 SCpnt->resid = 0;
1030 SCpnt->SCp.buffer = NULL;
1031 SCpnt->SCp.buffers_residual = 0;
1032 } else {
1025 if (SCpnt->use_sg) { 1033 if (SCpnt->use_sg) {
1026 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer; 1034 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
1027 SCpnt->SCp.ptr = SG_ADDRESS(SCpnt->SCp.buffer); 1035 SCpnt->SCp.ptr = SG_ADDRESS(SCpnt->SCp.buffer);
@@ -1033,6 +1041,7 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
1033 SCpnt->SCp.buffer = NULL; 1041 SCpnt->SCp.buffer = NULL;
1034 SCpnt->SCp.buffers_residual = 0; 1042 SCpnt->SCp.buffers_residual = 0;
1035 } 1043 }
1044 }
1036 1045
1037 DO_LOCK(flags); 1046 DO_LOCK(flags);
1038 1047
@@ -1150,9 +1159,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
1150 DECLARE_COMPLETION(done); 1159 DECLARE_COMPLETION(done);
1151 int ret, issued, disconnected; 1160 int ret, issued, disconnected;
1152 unsigned char old_cmd_len = SCpnt->cmd_len; 1161 unsigned char old_cmd_len = SCpnt->cmd_len;
1153 unsigned short old_use_sg = SCpnt->use_sg;
1154 void *old_buffer = SCpnt->request_buffer;
1155 unsigned old_bufflen = SCpnt->request_bufflen;
1156 unsigned long flags; 1162 unsigned long flags;
1157 unsigned long timeleft; 1163 unsigned long timeleft;
1158 1164
@@ -1174,9 +1180,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
1174 DO_UNLOCK(flags); 1180 DO_UNLOCK(flags);
1175 1181
1176 SCpnt->cmd_len = 0; 1182 SCpnt->cmd_len = 0;
1177 SCpnt->use_sg = 0;
1178 SCpnt->request_buffer = NULL;
1179 SCpnt->request_bufflen = 0;
1180 1183
1181 aha152x_internal_queue(SCpnt, &done, resetting, reset_done); 1184 aha152x_internal_queue(SCpnt, &done, resetting, reset_done);
1182 1185
@@ -1189,9 +1192,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
1189 } 1192 }
1190 1193
1191 SCpnt->cmd_len = old_cmd_len; 1194 SCpnt->cmd_len = old_cmd_len;
1192 SCpnt->use_sg = old_use_sg;
1193 SCpnt->request_buffer = old_buffer;
1194 SCpnt->request_bufflen = old_bufflen;
1195 1195
1196 DO_LOCK(flags); 1196 DO_LOCK(flags);
1197 1197