Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63692
b: refs/heads/master
c: 66acdb0
h: refs/heads/master
v: v3
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Aug 4, 2007
1 parent 2461779 commit 6cd570f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ceb47987d31f8529c60f1e802e0523fcde9492c
refs/heads/master: 66acdb0309507950376393f2fb1c8e7482fb4d52
18 changes: 9 additions & 9 deletions trunk/drivers/scsi/aha152x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,14 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
SCp.buffer : next buffer
SCp.buffers_residual : left buffers in list
SCp.phase : current state of the command */

if(phase & resetting) {
SCpnt->SCp.ptr = NULL;
SCpnt->SCp.this_residual = 0;
SCpnt->resid = 0;
SCpnt->SCp.buffer = NULL;
SCpnt->SCp.buffers_residual = 0;
} else {
if (SCpnt->use_sg) {
SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
SCpnt->SCp.ptr = SG_ADDRESS(SCpnt->SCp.buffer);
Expand All @@ -1033,6 +1041,7 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
SCpnt->SCp.buffer = NULL;
SCpnt->SCp.buffers_residual = 0;
}
}

DO_LOCK(flags);

Expand Down Expand Up @@ -1150,9 +1159,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
DECLARE_COMPLETION(done);
int ret, issued, disconnected;
unsigned char old_cmd_len = SCpnt->cmd_len;
unsigned short old_use_sg = SCpnt->use_sg;
void *old_buffer = SCpnt->request_buffer;
unsigned old_bufflen = SCpnt->request_bufflen;
unsigned long flags;
unsigned long timeleft;

Expand All @@ -1174,9 +1180,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
DO_UNLOCK(flags);

SCpnt->cmd_len = 0;
SCpnt->use_sg = 0;
SCpnt->request_buffer = NULL;
SCpnt->request_bufflen = 0;

aha152x_internal_queue(SCpnt, &done, resetting, reset_done);

Expand All @@ -1189,9 +1192,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
}

SCpnt->cmd_len = old_cmd_len;
SCpnt->use_sg = old_use_sg;
SCpnt->request_buffer = old_buffer;
SCpnt->request_bufflen = old_bufflen;

DO_LOCK(flags);

Expand Down

0 comments on commit 6cd570f

Please sign in to comment.