From effcf3df282ba66e60718cefd08c6a3ed57d9dd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20H=C3=B6ppner?= Date: Mon, 2 Feb 2026 14:48:40 +0100 Subject: [PATCH] s390/tape: Remove tape load display support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jens Remus Signed-off-by: Heiko Carstens --- arch/s390/include/uapi/asm/tape390.h | 39 ---------------------------- drivers/s390/char/tape.h | 2 -- drivers/s390/char/tape_34xx.c | 18 ------------- drivers/s390/char/tape_char.c | 5 +--- drivers/s390/char/tape_std.c | 32 ----------------------- drivers/s390/char/tape_std.h | 4 --- 6 files changed, 1 insertion(+), 99 deletions(-) delete mode 100644 arch/s390/include/uapi/asm/tape390.h diff --git a/arch/s390/include/uapi/asm/tape390.h b/arch/s390/include/uapi/asm/tape390.h deleted file mode 100644 index 880065cfa0393..0000000000000 --- a/arch/s390/include/uapi/asm/tape390.h +++ /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 - * - *************************************************************************/ - -#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 diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index b65a18f3dc949..0dbec870e9ae1 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h @@ -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; }; diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index a13e0ac1a4e20..b555829f741cd 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c @@ -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 }; diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index c5d3c303c15ce..879331e2f2839 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c @@ -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 diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 43a5586685ffc..96b7440126d29 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c @@ -22,7 +22,6 @@ #include #include #include -#include #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); diff --git a/drivers/s390/char/tape_std.h b/drivers/s390/char/tape_std.h index 5fef8b28309c4..580241866d9ed 100644 --- a/drivers/s390/char/tape_std.h +++ b/drivers/s390/char/tape_std.h @@ -11,8 +11,6 @@ #ifndef _TAPE_STD_H #define _TAPE_STD_H -#include - /* * 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. */ -- 2.47.3