+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*************************************************************************
- *
- * enables user programs to display messages and control encryption
- * on s390 tape devices
- *
- * Copyright IBM Corp. 2001, 2006
- * Author(s): Michael Holzheu <holzheu@de.ibm.com>
- *
- *************************************************************************/
-
-#ifndef _TAPE390_H
-#define _TAPE390_H
-
-#define TAPE390_DISPLAY _IOW('d', 1, struct display_struct)
-
-/*
- * The TAPE390_DISPLAY ioctl calls the Load Display command
- * which transfers 17 bytes of data from the channel to the subsystem:
- * - 1 format control byte, and
- * - two 8-byte messages
- *
- * Format control byte:
- * 0-2: New Message Overlay
- * 3: Alternate Messages
- * 4: Blink Message
- * 5: Display Low/High Message
- * 6: Reserved
- * 7: Automatic Load Request
- *
- */
-
-typedef struct display_struct {
- char cntrl;
- char message1[8];
- char message2[8];
-} display_struct;
-
-#endif
struct tape_request *(*read_block)(struct tape_device *);
struct tape_request *(*write_block)(struct tape_device *);
void (*process_eov)(struct tape_device*);
- /* ioctl function for additional ioctls. */
- int (*ioctl_fn)(struct tape_device *, unsigned int, unsigned long);
/* Array of tape commands with TAPE_NR_MTOPS entries */
tape_mtop_fn *mtop_array;
};
return TAPE_IO_STOP;
}
-/*
- * ioctl_overload
- */
-static int
-tape_34xx_ioctl(struct tape_device *device, unsigned int cmd, unsigned long arg)
-{
- if (cmd == TAPE390_DISPLAY) {
- struct display_struct disp;
-
- if (copy_from_user(&disp, (char __user *) arg, sizeof(disp)) != 0)
- return -EFAULT;
-
- return tape_std_display(device, &disp);
- } else
- return -EINVAL;
-}
-
static inline void
tape_34xx_append_new_sbid(struct tape_34xx_block_id bid, struct list_head *l)
{
.irq = tape_34xx_irq,
.read_block = tape_std_read_block,
.write_block = tape_std_write_block,
- .ioctl_fn = tape_34xx_ioctl,
.mtop_array = tape_34xx_mtop
};
return put_user_mtget(data, &get);
}
- /* Try the discipline ioctl function. */
- if (device->discipline->ioctl_fn == NULL)
- return -EINVAL;
- return device->discipline->ioctl_fn(device, no, (unsigned long)data);
+ return -EINVAL;
}
static long
#include <asm/types.h>
#include <asm/idals.h>
#include <asm/ebcdic.h>
-#include <asm/tape390.h>
#define TAPE_DBF_AREA tape_core_dbf
return rc;
}
-/*
- * TAPE390_DISPLAY: Show a string on the tape display.
- */
-int
-tape_std_display(struct tape_device *device, struct display_struct *disp)
-{
- struct tape_request *request;
- int rc;
-
- request = tape_alloc_request(2, 17);
- if (IS_ERR(request)) {
- DBF_EVENT(3, "TAPE: load display failed\n");
- return PTR_ERR(request);
- }
- request->op = TO_DIS;
-
- *(unsigned char *) request->cpdata = disp->cntrl;
- DBF_EVENT(5, "TAPE: display cntrl=%04x\n", disp->cntrl);
- memcpy(((unsigned char *) request->cpdata) + 1, disp->message1, 8);
- memcpy(((unsigned char *) request->cpdata) + 9, disp->message2, 8);
- ASCEBC(((unsigned char*) request->cpdata) + 1, 16);
-
- tape_ccw_cc(request->cpaddr, LOAD_DISPLAY, 17, request->cpdata);
- tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL);
-
- rc = tape_do_io_interruptible(device, request);
- tape_free_request(request);
- return rc;
-}
-
/*
* Read block id.
*/
EXPORT_SYMBOL(tape_std_assign);
EXPORT_SYMBOL(tape_std_unassign);
-EXPORT_SYMBOL(tape_std_display);
EXPORT_SYMBOL(tape_std_read_block_id);
EXPORT_SYMBOL(tape_std_mtload);
EXPORT_SYMBOL(tape_std_mtsetblk);
#ifndef _TAPE_STD_H
#define _TAPE_STD_H
-#include <asm/tape390.h>
-
/*
* Biggest block size of 256K to handle.
*/
#define ASSIGN 0xB7 /* 3420 REJECT,3480 OK */
#define CONTROL_ACCESS 0xE3 /* Set high speed */
#define DIAG_MODE_SET 0x0B /* 3420 NOP, 3480 REJECT */
-#define LOAD_DISPLAY 0x9F /* 3420 REJECT,3480 OK */
#define LOCATE 0x4F /* 3420 REJ, 3480 NOP */
#define LOOP_WRITE_TO_READ 0x8B /* 3480 REJECT */
#define MODE_SET_DB 0xDB /* 3420 REJECT,3480 OK */
int tape_std_assign(struct tape_device *);
int tape_std_unassign(struct tape_device *);
int tape_std_read_block_id(struct tape_device *device, __u64 *id);
-int tape_std_display(struct tape_device *, struct display_struct *disp);
int tape_std_terminate_write(struct tape_device *);
/* Standard magnetic tape commands. */