Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124661
b: refs/heads/master
c: 39ade4b
h: refs/heads/master
i:
  124659: e86d9c0
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent af9ceef commit d46e0f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 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: 15c920a6dc65ea0117bc5d4fd025d4b2eab13d59
refs/heads/master: 39ade4b1acb685127d73b53814850d9c92084c9e
21 changes: 14 additions & 7 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ static int cross_eof(struct scsi_tape * STp, int forward)
{
struct st_request *SRpnt;
unsigned char cmd[MAX_COMMAND_SIZE];
int ret;

cmd[0] = SPACE;
cmd[1] = 0x01; /* Space FileMarks */
Expand All @@ -640,20 +641,26 @@ static int cross_eof(struct scsi_tape * STp, int forward)
DEBC(printk(ST_DEB_MSG "%s: Stepping over filemark %s.\n",
tape_name(STp), forward ? "forward" : "backward"));

SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE,
STp->device->request_queue->rq_timeout,
MAX_RETRIES, 1);
SRpnt = st_allocate_request(STp);
if (!SRpnt)
return (STp->buffer)->syscall_result;
return STp->buffer->syscall_result;

st_release_request(SRpnt);
SRpnt = NULL;
ret = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0,
STp->device->request_queue->rq_timeout,
MAX_RETRIES);
if (ret)
goto out;

ret = STp->buffer->syscall_result;

if ((STp->buffer)->cmdstat.midlevel_result != 0)
printk(KERN_ERR "%s: Stepping over filemark %s failed.\n",
tape_name(STp), forward ? "forward" : "backward");

return (STp->buffer)->syscall_result;
out:
st_release_request(SRpnt);

return ret;
}


Expand Down

0 comments on commit d46e0f7

Please sign in to comment.