]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/tape: Remove tape load display support
authorJan Höppner <hoeppner@linux.ibm.com>
Mon, 2 Feb 2026 13:48:40 +0000 (14:48 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 4 Feb 2026 07:31:29 +0000 (08:31 +0100)
The LOAD_DISPLAY (LDD) X'9F' is still accepted by the Virtual Tape
Server (VTS) but does not perform any action.

Remove all functions and definitions related to this command.

The tape_34xx_ioctl() function is also removed as it was mainly used to
handle additional ioctl functionality. LOAD_DISPLAY was the only left
case. All other ioctls are handled in tapechar_ioctl().

With LOAD_DISPLAY, the remaining definitions in asm/tape390.h are gone.
Delete the file.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/uapi/asm/tape390.h [deleted file]
drivers/s390/char/tape.h
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_char.c
drivers/s390/char/tape_std.c
drivers/s390/char/tape_std.h

diff --git a/arch/s390/include/uapi/asm/tape390.h b/arch/s390/include/uapi/asm/tape390.h
deleted file mode 100644 (file)
index 880065c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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 
index b65a18f3dc9490675df74a1058492f12d5e93280..0dbec870e9ae133b70619b211084fda9facc99c0 100644 (file)
@@ -151,8 +151,6 @@ struct tape_discipline {
        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;
 };
index a13e0ac1a4e20b69eb4b67783634947d58c2f8b0..b555829f741cda22fdf51d67e99517b6fa5d6af0 100644 (file)
@@ -835,23 +835,6 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request,
        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)
 {
@@ -1134,7 +1117,6 @@ static struct tape_discipline tape_discipline_34xx = {
        .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
 };
 
index c5d3c303c15ce7af04e53fac1d9b6e13e287c82a..879331e2f28391b079198d68d79d077ce5a3eb49 100644 (file)
@@ -412,10 +412,7 @@ __tapechar_ioctl(struct tape_device *device,
 
                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
index 43a5586685ffc4763bca61f8c0dce55260d4bc9d..96b7440126d29e336f64a7ee3983f519993eef11 100644 (file)
@@ -22,7 +22,6 @@
 #include <asm/types.h>
 #include <asm/idals.h>
 #include <asm/ebcdic.h>
-#include <asm/tape390.h>
 
 #define TAPE_DBF_AREA  tape_core_dbf
 
@@ -118,36 +117,6 @@ tape_std_unassign (struct tape_device *device)
        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.
  */
@@ -696,7 +665,6 @@ tape_std_process_eov(struct tape_device *device)
 
 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);
index 5fef8b28309c4a3e8b3bbf50d38b71f8a48edb83..580241866d9edc6dce848e15e0b38ecc73c4a14d 100644 (file)
@@ -11,8 +11,6 @@
 #ifndef _TAPE_STD_H
 #define _TAPE_STD_H
 
-#include <asm/tape390.h>
-
 /*
  * Biggest block size of 256K to handle.
  */
@@ -41,7 +39,6 @@
 #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 */
@@ -105,7 +102,6 @@ struct tape_request *tape_std_write_block(struct tape_device *);
 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. */