Skip to content

Commit 5ae7683

Browse files
hoeppnerjhcahca
authored andcommitted
s390/tape: Consolidate tape config options and modules
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>
1 parent f65c75b commit 5ae7683

7 files changed

Lines changed: 23 additions & 49 deletions

File tree

drivers/s390/char/Kconfig

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,12 @@ config S390_UV_UAPI
106106

107107
config S390_TAPE
108108
def_tristate m
109-
prompt "S/390 tape device support"
109+
prompt "Support for 3490E tape on VTS"
110110
depends on CCW
111111
help
112-
Select this option if you want to access channel-attached tape
113-
devices on IBM S/390 or zSeries.
114-
If you select this option you will also want to select at
115-
least one of the tape interface options and one of the tape
116-
hardware options in order to access a tape device.
117-
This option is also available as a module. The module will be
118-
called tape390 and include all selected interfaces and
119-
hardware drivers.
120-
121-
comment "S/390 tape hardware support"
122-
depends on S390_TAPE
123-
124-
config S390_TAPE_3490
125-
def_tristate m
126-
prompt "Support for 3490 tape hardware"
127-
depends on S390_TAPE
128-
help
129-
Select this option if you want to access IBM 3490 magnetic
130-
tape subsystems and 100% compatibles.
112+
Select this option if you want to access channel-attached IBM 3490E
113+
tape devices on VTS, such as IBM TS7700.
114+
This option is also available as a module.
131115
It is safe to say "Y" here.
132116

133117
config VMLOGRDR

drivers/s390/char/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ obj-$(CONFIG_VMLOGRDR) += vmlogrdr.o
3939
obj-$(CONFIG_VMCP) += vmcp.o
4040

4141
tape-$(CONFIG_PROC_FS) += tape_proc.o
42-
tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
43-
obj-$(CONFIG_S390_TAPE) += tape.o tape_class.o
44-
obj-$(CONFIG_S390_TAPE_3490) += tape_3490.o
42+
tape_s390-objs := tape_3490.o tape_char.o tape_class.o tape_core.o tape_std.o $(tape-y)
43+
obj-$(CONFIG_S390_TAPE) += tape_s390.o
4544
obj-$(CONFIG_MONREADER) += monreader.o
4645
obj-$(CONFIG_MONWRITER) += monwriter.o
4746
obj-$(CONFIG_S390_VMUR) += vmur.o

drivers/s390/char/tape.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ extern void tapechar_exit(void);
274274
extern int tapechar_setup_device(struct tape_device *);
275275
extern void tapechar_cleanup_device(struct tape_device *);
276276

277+
/* Externals from tape_3490.c */
278+
extern int tape_3490_init(void);
279+
extern void tape_3490_exit(void);
280+
277281
/* tape initialisation functions */
278282
#ifdef CONFIG_PROC_FS
279283
extern void tape_proc_init (void);

drivers/s390/char/tape_3490.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,7 @@ static struct ccw_driver tape_3490_driver = {
795795
.int_class = IRQIO_TAP,
796796
};
797797

798-
static int
799-
tape_3490_init (void)
798+
int tape_3490_init(void)
800799
{
801800
int rc;
802801

@@ -816,18 +815,11 @@ tape_3490_init (void)
816815
return rc;
817816
}
818817

819-
static void
820-
tape_3490_exit(void)
818+
void tape_3490_exit(void)
821819
{
822820
ccw_driver_unregister(&tape_3490_driver);
823821

824822
debug_unregister(TAPE_DBF_AREA);
825823
}
826824

827825
MODULE_DEVICE_TABLE(ccw, tape_3490_ids);
828-
MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
829-
MODULE_DESCRIPTION("Linux on zSeries channel attached 3490 tape device driver");
830-
MODULE_LICENSE("GPL");
831-
832-
module_init(tape_3490_init);
833-
module_exit(tape_3490_exit);

drivers/s390/char/tape_class.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515

1616
#include "tape_class.h"
1717

18-
MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>");
19-
MODULE_DESCRIPTION(
20-
"Copyright IBM Corp. 2004 All Rights Reserved.\n"
21-
"tape_class.c"
22-
);
23-
MODULE_LICENSE("GPL");
24-
2518
static const struct class tape_class = {
2619
.name = "tape390",
2720
};
@@ -116,16 +109,12 @@ void unregister_tape_dev(struct device *device, struct tape_class_device *tcd)
116109
}
117110
EXPORT_SYMBOL(unregister_tape_dev);
118111

119-
120-
static int __init tape_init(void)
112+
int tape_class_init(void)
121113
{
122114
return class_register(&tape_class);
123115
}
124116

125-
static void __exit tape_exit(void)
117+
void tape_class_exit(void)
126118
{
127119
class_unregister(&tape_class);
128120
}
129-
130-
postcore_initcall(tape_init);
131-
module_exit(tape_exit);

drivers/s390/char/tape_class.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,7 @@ struct tape_class_device *register_tape_dev(
5555
char * node_name
5656
);
5757
void unregister_tape_dev(struct device *device, struct tape_class_device *tcd);
58+
int tape_class_init(void);
59+
void tape_class_exit(void);
5860

5961
#endif /* __TAPE_CLASS_H__ */

drivers/s390/char/tape_core.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "tape.h"
3030
#include "tape_std.h"
31+
#include "tape_class.h"
3132

3233
#define LONG_BUSY_TIMEOUT 180 /* seconds */
3334

@@ -1310,7 +1311,9 @@ tape_init (void)
13101311
#endif
13111312
DBF_EVENT(3, "tape init\n");
13121313
tape_proc_init();
1314+
tape_class_init();
13131315
tapechar_init ();
1316+
tape_3490_init();
13141317
return 0;
13151318
}
13161319

@@ -1323,14 +1326,15 @@ tape_exit(void)
13231326
DBF_EVENT(6, "tape exit\n");
13241327

13251328
/* Get rid of the frontends */
1329+
tape_3490_exit();
13261330
tapechar_exit();
1331+
tape_class_exit();
13271332
tape_proc_cleanup();
13281333
debug_unregister (TAPE_DBF_AREA);
13291334
}
13301335

1331-
MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and "
1332-
"Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)");
1333-
MODULE_DESCRIPTION("Linux on zSeries channel attached tape device driver");
1336+
MODULE_AUTHOR("IBM Corporation");
1337+
MODULE_DESCRIPTION("s390 channel-attached tape device driver");
13341338
MODULE_LICENSE("GPL");
13351339

13361340
module_init(tape_init);

0 commit comments

Comments
 (0)