From 5ae76830c76cf38708399245606e4e07a33fe51c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20H=C3=B6ppner?= Date: Wed, 4 Feb 2026 16:30:40 +0100 Subject: [PATCH] s390/tape: Consolidate tape config options and modules MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The tape device driver only supports 3490E devices on Virtual Tape Server (VTS). There is no point in keeping separated options and modules for different device types and general hardware support. Consolidate the tape config option into a single option, which enables the complete tape support with one singular module called 'tape_s390'. The corresponding module entry points are adapted and consolidate in tape_init() and tape_exit() respectively in tape_core.c The current module author and descriptions of the individual tape modules are outdated and haven't been changed for quite some time. Change it to a more generic description that is in line with the corresponding supported s390 architecture for the single tape module. Signed-off-by: Jan Höppner Signed-off-by: Heiko Carstens --- drivers/s390/char/Kconfig | 24 ++++-------------------- drivers/s390/char/Makefile | 5 ++--- drivers/s390/char/tape.h | 4 ++++ drivers/s390/char/tape_3490.c | 12 ++---------- drivers/s390/char/tape_class.c | 15 ++------------- drivers/s390/char/tape_class.h | 2 ++ drivers/s390/char/tape_core.c | 10 +++++++--- 7 files changed, 23 insertions(+), 49 deletions(-) diff --git a/drivers/s390/char/Kconfig b/drivers/s390/char/Kconfig index 1139d260ea939..4d8f09910a465 100644 --- a/drivers/s390/char/Kconfig +++ b/drivers/s390/char/Kconfig @@ -106,28 +106,12 @@ config S390_UV_UAPI config S390_TAPE def_tristate m - prompt "S/390 tape device support" + prompt "Support for 3490E tape on VTS" depends on CCW help - Select this option if you want to access channel-attached tape - devices on IBM S/390 or zSeries. - If you select this option you will also want to select at - least one of the tape interface options and one of the tape - hardware options in order to access a tape device. - This option is also available as a module. The module will be - called tape390 and include all selected interfaces and - hardware drivers. - -comment "S/390 tape hardware support" - depends on S390_TAPE - -config S390_TAPE_3490 - def_tristate m - prompt "Support for 3490 tape hardware" - depends on S390_TAPE - help - Select this option if you want to access IBM 3490 magnetic - tape subsystems and 100% compatibles. + Select this option if you want to access channel-attached IBM 3490E + tape devices on VTS, such as IBM TS7700. + This option is also available as a module. It is safe to say "Y" here. config VMLOGRDR diff --git a/drivers/s390/char/Makefile b/drivers/s390/char/Makefile index 8256fac51c131..126a87c3c6f88 100644 --- a/drivers/s390/char/Makefile +++ b/drivers/s390/char/Makefile @@ -39,9 +39,8 @@ obj-$(CONFIG_VMLOGRDR) += vmlogrdr.o obj-$(CONFIG_VMCP) += vmcp.o tape-$(CONFIG_PROC_FS) += tape_proc.o -tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y) -obj-$(CONFIG_S390_TAPE) += tape.o tape_class.o -obj-$(CONFIG_S390_TAPE_3490) += tape_3490.o +tape_s390-objs := tape_3490.o tape_char.o tape_class.o tape_core.o tape_std.o $(tape-y) +obj-$(CONFIG_S390_TAPE) += tape_s390.o obj-$(CONFIG_MONREADER) += monreader.o obj-$(CONFIG_MONWRITER) += monwriter.o obj-$(CONFIG_S390_VMUR) += vmur.o diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index bfbfb3b48acaf..59541bd88d513 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h @@ -274,6 +274,10 @@ extern void tapechar_exit(void); extern int tapechar_setup_device(struct tape_device *); extern void tapechar_cleanup_device(struct tape_device *); +/* Externals from tape_3490.c */ +extern int tape_3490_init(void); +extern void tape_3490_exit(void); + /* tape initialisation functions */ #ifdef CONFIG_PROC_FS extern void tape_proc_init (void); diff --git a/drivers/s390/char/tape_3490.c b/drivers/s390/char/tape_3490.c index 83898f92ad0f1..c4ea32af1b65a 100644 --- a/drivers/s390/char/tape_3490.c +++ b/drivers/s390/char/tape_3490.c @@ -795,8 +795,7 @@ static struct ccw_driver tape_3490_driver = { .int_class = IRQIO_TAP, }; -static int -tape_3490_init (void) +int tape_3490_init(void) { int rc; @@ -816,8 +815,7 @@ tape_3490_init (void) return rc; } -static void -tape_3490_exit(void) +void tape_3490_exit(void) { ccw_driver_unregister(&tape_3490_driver); @@ -825,9 +823,3 @@ tape_3490_exit(void) } MODULE_DEVICE_TABLE(ccw, tape_3490_ids); -MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH"); -MODULE_DESCRIPTION("Linux on zSeries channel attached 3490 tape device driver"); -MODULE_LICENSE("GPL"); - -module_init(tape_3490_init); -module_exit(tape_3490_exit); diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 6fa7b78248569..1ae9ad219c081 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -15,13 +15,6 @@ #include "tape_class.h" -MODULE_AUTHOR("Stefan Bader "); -MODULE_DESCRIPTION( - "Copyright IBM Corp. 2004 All Rights Reserved.\n" - "tape_class.c" -); -MODULE_LICENSE("GPL"); - static const struct class tape_class = { .name = "tape390", }; @@ -116,16 +109,12 @@ void unregister_tape_dev(struct device *device, struct tape_class_device *tcd) } EXPORT_SYMBOL(unregister_tape_dev); - -static int __init tape_init(void) +int tape_class_init(void) { return class_register(&tape_class); } -static void __exit tape_exit(void) +void tape_class_exit(void) { class_unregister(&tape_class); } - -postcore_initcall(tape_init); -module_exit(tape_exit); diff --git a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h index d25ac075b1adc..0bb6f0ca45b6c 100644 --- a/drivers/s390/char/tape_class.h +++ b/drivers/s390/char/tape_class.h @@ -55,5 +55,7 @@ struct tape_class_device *register_tape_dev( char * node_name ); void unregister_tape_dev(struct device *device, struct tape_class_device *tcd); +int tape_class_init(void); +void tape_class_exit(void); #endif /* __TAPE_CLASS_H__ */ diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 7cf7167dcf56f..a62b650ea3c2a 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -28,6 +28,7 @@ #include "tape.h" #include "tape_std.h" +#include "tape_class.h" #define LONG_BUSY_TIMEOUT 180 /* seconds */ @@ -1310,7 +1311,9 @@ tape_init (void) #endif DBF_EVENT(3, "tape init\n"); tape_proc_init(); + tape_class_init(); tapechar_init (); + tape_3490_init(); return 0; } @@ -1323,14 +1326,15 @@ tape_exit(void) DBF_EVENT(6, "tape exit\n"); /* Get rid of the frontends */ + tape_3490_exit(); tapechar_exit(); + tape_class_exit(); tape_proc_cleanup(); debug_unregister (TAPE_DBF_AREA); } -MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and " - "Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)"); -MODULE_DESCRIPTION("Linux on zSeries channel attached tape device driver"); +MODULE_AUTHOR("IBM Corporation"); +MODULE_DESCRIPTION("s390 channel-attached tape device driver"); MODULE_LICENSE("GPL"); module_init(tape_init); -- 2.47.3