/* MTRETEN: Retension the tape, i.e. forward space to end of tape and rewind.  */
int tape_std_mtreten(struct tape_device *device, int mt_count)
/* MTRETEN: Retension the tape, i.e. forward space to end of tape and rewind.  */
int tape_std_mtreten(struct tape_device *device, int mt_count)
{
	struct tape_request *request;
	int rc;
	request = tape_alloc_request(4, 0);
	if (IS_ERR(request))
		return PTR_ERR(request);
	request->op = TO_FSF;
	tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
	tape_ccw_cc(request->cpaddr + 1,FORSPACEFILE, 0, NULL);
	tape_ccw_cc(request->cpaddr + 2, NOP, 0, NULL);
	tape_ccw_end(request->cpaddr + 3, CCW_CMD_TIC, 0, request->cpaddr);
	rc = tape_do_io_interruptible(device, request);
	tape_free_request(request);
	return tape_mtop(device, MTREW, 1);
}