Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124658
b: refs/heads/master
c: 0944a72
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent 2aeeebd commit f710902
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: ffb4349499c00cd8ec90cb896599789cc00a7415
refs/heads/master: 0944a721ba5c2535b615f06afd3aaa2f18c69cb9
19 changes: 11 additions & 8 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,21 +874,24 @@ static int test_ready(struct scsi_tape *STp, int do_wait)
int attentions, waits, max_wait, scode;
int retval = CHKRES_READY, new_session = 0;
unsigned char cmd[MAX_COMMAND_SIZE];
struct st_request *SRpnt = NULL;
struct st_request *SRpnt;
struct st_cmdstatus *cmdstatp = &STp->buffer->cmdstat;

SRpnt = st_allocate_request(STp);
if (!SRpnt)
return STp->buffer->syscall_result;

max_wait = do_wait ? ST_BLOCK_SECONDS : 0;

for (attentions=waits=0; ; ) {
memset((void *) &cmd[0], 0, MAX_COMMAND_SIZE);
cmd[0] = TEST_UNIT_READY;
SRpnt = st_do_scsi(SRpnt, STp, cmd, 0, DMA_NONE,
STp->long_timeout, MAX_READY_RETRIES, 1);

if (!SRpnt) {
retval = (STp->buffer)->syscall_result;
retval = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0,
STp->long_timeout,
MAX_READY_RETRIES);
if (retval)
break;
}

if (cmdstatp->have_sense) {

Expand Down Expand Up @@ -932,8 +935,8 @@ static int test_ready(struct scsi_tape *STp, int do_wait)
break;
}

if (SRpnt != NULL)
st_release_request(SRpnt);
st_release_request(SRpnt);

return retval;
}

Expand Down

0 comments on commit f710902

Please sign in to comment.