Commit 39ade4b1 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] st: convert cross_eof to use st_scsi_kern_execute

This replaces st_do_scsi in cross_eof (SPACE) with
st_scsi_kern_execute.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarKai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 15c920a6
...@@ -627,6 +627,7 @@ static int cross_eof(struct scsi_tape * STp, int forward) ...@@ -627,6 +627,7 @@ static int cross_eof(struct scsi_tape * STp, int forward)
{ {
struct st_request *SRpnt; struct st_request *SRpnt;
unsigned char cmd[MAX_COMMAND_SIZE]; unsigned char cmd[MAX_COMMAND_SIZE];
int ret;
cmd[0] = SPACE; cmd[0] = SPACE;
cmd[1] = 0x01; /* Space FileMarks */ cmd[1] = 0x01; /* Space FileMarks */
...@@ -640,20 +641,26 @@ static int cross_eof(struct scsi_tape * STp, int forward) ...@@ -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", DEBC(printk(ST_DEB_MSG "%s: Stepping over filemark %s.\n",
tape_name(STp), forward ? "forward" : "backward")); tape_name(STp), forward ? "forward" : "backward"));
SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, SRpnt = st_allocate_request(STp);
STp->device->request_queue->rq_timeout,
MAX_RETRIES, 1);
if (!SRpnt) if (!SRpnt)
return (STp->buffer)->syscall_result; return STp->buffer->syscall_result;
st_release_request(SRpnt); ret = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0,
SRpnt = NULL; STp->device->request_queue->rq_timeout,
MAX_RETRIES);
if (ret)
goto out;
ret = STp->buffer->syscall_result;
if ((STp->buffer)->cmdstat.midlevel_result != 0) if ((STp->buffer)->cmdstat.midlevel_result != 0)
printk(KERN_ERR "%s: Stepping over filemark %s failed.\n", printk(KERN_ERR "%s: Stepping over filemark %s failed.\n",
tape_name(STp), forward ? "forward" : "backward"); tape_name(STp), forward ? "forward" : "backward");
return (STp->buffer)->syscall_result; out:
st_release_request(SRpnt);
return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment