Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124657
b: refs/heads/master
c: ffb4349
h: refs/heads/master
i:
  124655: b4c6b88
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent 9cd84bb commit 2aeeebd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4deba245d0d6b2dc97cc4277c37f8519655d3afe
refs/heads/master: ffb4349499c00cd8ec90cb896599789cc00a7415
22 changes: 22 additions & 0 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,28 @@ st_do_scsi(struct st_request * SRpnt, struct scsi_tape * STp, unsigned char *cmd
return SRpnt;
}

static int st_scsi_kern_execute(struct st_request *streq,
const unsigned char *cmd, int data_direction,
void *buffer, unsigned bufflen, int timeout,
int retries)
{
struct scsi_tape *stp = streq->stp;
int ret, resid;

stp->buffer->cmdstat.have_sense = 0;
memcpy(streq->cmd, cmd, sizeof(streq->cmd));

ret = scsi_execute(stp->device, cmd, data_direction, buffer, bufflen,
streq->sense, timeout, retries, 0, &resid);
if (driver_byte(ret) & DRIVER_ERROR)
return -EBUSY;

stp->buffer->cmdstat.midlevel_result = streq->result = ret;
stp->buffer->cmdstat.residual = resid;
stp->buffer->syscall_result = st_chk_result(stp, streq);

return 0;
}

/* Handle the write-behind checking (waits for completion). Returns -ENOSPC if
write has been correct but EOM early warning reached, -EIO if write ended in
Expand Down

0 comments on commit 2aeeebd

Please sign in to comment.