/* MTOFFL: Rewind the tape and put the drive off-line. Implement 'rewind unload'  */
int tape_std_mtoffl(struct tape_device *device, int mt_count)
/* MTOFFL: Rewind the tape and put the drive off-line. Implement 'rewind unload'  */
int tape_std_mtoffl(struct tape_device *device, int mt_count)
{
	struct tape_request *request;
	request = tape_alloc_request(3, 0);
	if (IS_ERR(request))
		return PTR_ERR(request);
	request->op = TO_RUN;
	tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
	tape_ccw_cc(request->cpaddr + 1, REWIND_UNLOAD, 0, NULL);
	tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL);
	return tape_do_io_free(device, request);
}