Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c0bf16c authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley
Browse files

[SCSI] st: convert set_location to use st_scsi_kern_execute



This replaces st_do_scsi in set_location (LOCATE 10) 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 0944a721
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -3088,10 +3088,14 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition
		timeout = STp->device->request_queue->rq_timeout;
		timeout = STp->device->request_queue->rq_timeout;
	}
	}


	SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,
	SRpnt = st_allocate_request(STp);
			   timeout, MAX_READY_RETRIES, 1);
	if (!SRpnt)
	if (!SRpnt)
		return (STp->buffer)->syscall_result;
		return STp->buffer->syscall_result;

	result = st_scsi_kern_execute(SRpnt, scmd, DMA_NONE, NULL, 0,
				      timeout, MAX_READY_RETRIES);
	if (result)
		goto out;


	STps->drv_block = STps->drv_file = (-1);
	STps->drv_block = STps->drv_file = (-1);
	STps->eof = ST_NOEOF;
	STps->eof = ST_NOEOF;
@@ -3116,7 +3120,7 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition
			STps->drv_block = STps->drv_file = 0;
			STps->drv_block = STps->drv_file = 0;
		result = 0;
		result = 0;
	}
	}

out:
	st_release_request(SRpnt);
	st_release_request(SRpnt);
	SRpnt = NULL;
	SRpnt = NULL;