]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/tape: Consolidate tape config options and modules
authorJan Höppner <hoeppner@linux.ibm.com>
Wed, 4 Feb 2026 15:30:40 +0000 (16:30 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 5 Feb 2026 12:02:48 +0000 (13:02 +0100)
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 <hoeppner@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/Kconfig
drivers/s390/char/Makefile
drivers/s390/char/tape.h
drivers/s390/char/tape_3490.c
drivers/s390/char/tape_class.c
drivers/s390/char/tape_class.h
drivers/s390/char/tape_core.c

index 1139d260ea9395ff2ae501ae340545eddee82c9e..4d8f09910a465323819051bb7e9ec55605a9e83d 100644 (file)
@@ -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
index 8256fac51c13134713e0d3c96f71ce90223dbd6e..126a87c3c6f88f7155d786a75b418ee9051a666c 100644 (file)
@@ -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
index bfbfb3b48acaf4c13db8e5716c16d43bc789a5c5..59541bd88d513902c72e5f68492e00cb226b9066 100644 (file)
@@ -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);
index 83898f92ad0f1bfce4d1e00e5b2e4106dc70e696..c4ea32af1b65a6bbe5423d62711c649779252e4d 100644 (file)
@@ -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);
index 6fa7b78248569ab5827bfd1cf5587aa5cc4b0277..1ae9ad219c0816bf105967ab9750cd6c77649d3e 100644 (file)
 
 #include "tape_class.h"
 
-MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>");
-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);
index d25ac075b1adca690bc013014d84ceb62f060025..0bb6f0ca45b6c14bee25931bd898ef264c4bab39 100644 (file)
@@ -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__ */
index 7cf7167dcf56f5ed9736ce94227bc0b9d2d51440..a62b650ea3c2a8383732a6d7dafadf2bb971dc0b 100644 (file)
@@ -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);