Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124664
b: refs/heads/master
c: 8ecf0d9
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent c68a85b commit 66f3463
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: 52107b2c575d76bf210ff7e995128042594324ac
refs/heads/master: 8ecf0d994a8d3fb439e1efea6f60c22831bf69c8
16 changes: 10 additions & 6 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,8 @@ static int st_set_options(struct scsi_tape *STp, long options)
static int read_mode_page(struct scsi_tape *STp, int page, int omit_block_descs)
{
unsigned char cmd[MAX_COMMAND_SIZE];
struct st_request *SRpnt = NULL;
struct st_request *SRpnt;
int ret;

memset(cmd, 0, MAX_COMMAND_SIZE);
cmd[0] = MODE_SENSE;
Expand All @@ -2380,14 +2381,17 @@ static int read_mode_page(struct scsi_tape *STp, int page, int omit_block_descs)
cmd[2] = page;
cmd[4] = 255;

SRpnt = st_do_scsi(SRpnt, STp, cmd, cmd[4], DMA_FROM_DEVICE,
STp->device->request_queue->rq_timeout, 0, 1);
if (SRpnt == NULL)
return (STp->buffer)->syscall_result;
SRpnt = st_allocate_request(STp);
if (!SRpnt)
return STp->buffer->syscall_result;

ret = st_scsi_kern_execute(SRpnt, cmd, DMA_FROM_DEVICE,
STp->buffer->b_data, cmd[4],
STp->device->request_queue->rq_timeout,
MAX_RETRIES);
st_release_request(SRpnt);

return (STp->buffer)->syscall_result;
return ret ? : STp->buffer->syscall_result;
}


Expand Down

0 comments on commit 66f3463

Please sign in to comment.