Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124663
b: refs/heads/master
c: 52107b2
h: refs/heads/master
i:
  124661: d46e0f7
  124659: e86d9c0
  124655: b4c6b88
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent a474b25 commit c68a85b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 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: 212cd8bfe12bb115e7bc9e119fe1411451829afb
refs/heads/master: 52107b2c575d76bf210ff7e995128042594324ac
28 changes: 18 additions & 10 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,17 +1020,24 @@ static int check_tape(struct scsi_tape *STp, struct file *filp)
}
}

SRpnt = st_allocate_request(STp);
if (!SRpnt) {
retval = STp->buffer->syscall_result;
goto err_out;
}

if (STp->omit_blklims)
STp->min_block = STp->max_block = (-1);
else {
memset((void *) &cmd[0], 0, MAX_COMMAND_SIZE);
cmd[0] = READ_BLOCK_LIMITS;

SRpnt = st_do_scsi(SRpnt, STp, cmd, 6, DMA_FROM_DEVICE,
STp->device->request_queue->rq_timeout,
MAX_READY_RETRIES, 1);
if (!SRpnt) {
retval = (STp->buffer)->syscall_result;
retval = st_scsi_kern_execute(SRpnt, cmd, DMA_FROM_DEVICE,
STp->buffer->b_data, 6,
STp->device->request_queue->rq_timeout,
MAX_READY_RETRIES);
if (retval) {
st_release_request(SRpnt);
goto err_out;
}

Expand All @@ -1054,11 +1061,12 @@ static int check_tape(struct scsi_tape *STp, struct file *filp)
cmd[0] = MODE_SENSE;
cmd[4] = 12;

SRpnt = st_do_scsi(SRpnt, STp, cmd, 12, DMA_FROM_DEVICE,
STp->device->request_queue->rq_timeout,
MAX_READY_RETRIES, 1);
if (!SRpnt) {
retval = (STp->buffer)->syscall_result;
retval = st_scsi_kern_execute(SRpnt, cmd, DMA_FROM_DEVICE,
STp->buffer->b_data, 12,
STp->device->request_queue->rq_timeout,
MAX_READY_RETRIES);
if (retval) {
st_release_request(SRpnt);
goto err_out;
}

Expand Down

0 comments on commit c68a85b

Please sign in to comment.