Commit d0d0061c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: tape driver changes

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

From: Stefan Bader <shbader@de.ibm.com>

tape driver changes:
 - Create seperate debug areas for core and discipline modules.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 70553da9
...@@ -32,7 +32,7 @@ struct gendisk; ...@@ -32,7 +32,7 @@ struct gendisk;
#ifdef DBF_LIKE_HELL #ifdef DBF_LIKE_HELL
#define DBF_LH(level, str, ...) \ #define DBF_LH(level, str, ...) \
do { \ do { \
debug_sprintf_event(tape_dbf_area, level, str, ## __VA_ARGS__); \ debug_sprintf_event(TAPE_DBF_AREA, level, str, ## __VA_ARGS__); \
} while (0) } while (0)
#else #else
#define DBF_LH(level, str, ...) do {} while(0) #define DBF_LH(level, str, ...) do {} while(0)
...@@ -43,12 +43,12 @@ do { \ ...@@ -43,12 +43,12 @@ do { \
*/ */
#define DBF_EVENT(d_level, d_str...) \ #define DBF_EVENT(d_level, d_str...) \
do { \ do { \
debug_sprintf_event(tape_dbf_area, d_level, d_str); \ debug_sprintf_event(TAPE_DBF_AREA, d_level, d_str); \
} while (0) } while (0)
#define DBF_EXCEPTION(d_level, d_str...) \ #define DBF_EXCEPTION(d_level, d_str...) \
do { \ do { \
debug_sprintf_exception(tape_dbf_area, d_level, d_str); \ debug_sprintf_exception(TAPE_DBF_AREA, d_level, d_str); \
} while (0) } while (0)
#define TAPE_VERSION_MAJOR 2 #define TAPE_VERSION_MAJOR 2
...@@ -313,7 +313,7 @@ extern void tape_dump_sense_dbf(struct tape_device *, struct tape_request *, ...@@ -313,7 +313,7 @@ extern void tape_dump_sense_dbf(struct tape_device *, struct tape_request *,
extern void tape_med_state_set(struct tape_device *, enum tape_medium_state); extern void tape_med_state_set(struct tape_device *, enum tape_medium_state);
/* The debug area */ /* The debug area */
extern debug_info_t *tape_dbf_area; extern debug_info_t *TAPE_DBF_AREA;
/* functions for building ccws */ /* functions for building ccws */
static inline struct ccw1 * static inline struct ccw1 *
......
...@@ -15,11 +15,19 @@ ...@@ -15,11 +15,19 @@
#include <linux/bio.h> #include <linux/bio.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#define TAPE_DBF_AREA tape_34xx_dbf
#include "tape.h" #include "tape.h"
#include "tape_std.h" #include "tape_std.h"
#define PRINTK_HEADER "TAPE_34XX: " #define PRINTK_HEADER "TAPE_34XX: "
/*
* Pointer to debug area.
*/
debug_info_t *TAPE_DBF_AREA = NULL;
EXPORT_SYMBOL(TAPE_DBF_AREA);
enum tape_34xx_type { enum tape_34xx_type {
tape_3480, tape_3480,
tape_3490, tape_3490,
...@@ -1343,7 +1351,13 @@ tape_34xx_init (void) ...@@ -1343,7 +1351,13 @@ tape_34xx_init (void)
{ {
int rc; int rc;
DBF_EVENT(3, "34xx init: $Revision: 1.20 $\n"); TAPE_DBF_AREA = debug_register ( "tape_34xx", 1, 2, 4*sizeof(long));
debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
#ifdef DBF_LIKE_HELL
debug_set_level(TAPE_DBF_AREA, 6);
#endif
DBF_EVENT(3, "34xx init: $Revision: 1.21 $\n");
/* Register driver for 3480/3490 tapes. */ /* Register driver for 3480/3490 tapes. */
rc = ccw_driver_register(&tape_34xx_driver); rc = ccw_driver_register(&tape_34xx_driver);
if (rc) if (rc)
...@@ -1357,12 +1371,14 @@ static void ...@@ -1357,12 +1371,14 @@ static void
tape_34xx_exit(void) tape_34xx_exit(void)
{ {
ccw_driver_unregister(&tape_34xx_driver); ccw_driver_unregister(&tape_34xx_driver);
debug_unregister(TAPE_DBF_AREA);
} }
MODULE_DEVICE_TABLE(ccw, tape_34xx_ids); MODULE_DEVICE_TABLE(ccw, tape_34xx_ids);
MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH"); MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape " MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape "
"device driver ($Revision: 1.20 $)"); "device driver ($Revision: 1.21 $)");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(tape_34xx_init); module_init(tape_34xx_init);
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <asm/debug.h> #include <asm/debug.h>
#define TAPE_DBF_AREA tape_core_dbf
#include "tape.h" #include "tape.h"
#define PRINTK_HEADER "TAPE_BLOCK: " #define PRINTK_HEADER "TAPE_BLOCK: "
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define TAPE_DBF_AREA tape_core_dbf
#include "tape.h" #include "tape.h"
#include "tape_std.h" #include "tape_std.h"
#include "tape_class.h" #include "tape_class.h"
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <asm/types.h> // for variable types #include <asm/types.h> // for variable types
#define TAPE_DBF_AREA tape_core_dbf
#include "tape.h" #include "tape.h"
#include "tape_std.h" #include "tape_std.h"
...@@ -39,7 +41,8 @@ static rwlock_t tape_device_lock = RW_LOCK_UNLOCKED; ...@@ -39,7 +41,8 @@ static rwlock_t tape_device_lock = RW_LOCK_UNLOCKED;
/* /*
* Pointer to debug area. * Pointer to debug area.
*/ */
debug_info_t *tape_dbf_area = NULL; debug_info_t *TAPE_DBF_AREA = NULL;
EXPORT_SYMBOL(TAPE_DBF_AREA);
/* /*
* Printable strings for tape enumerations. * Printable strings for tape enumerations.
...@@ -1176,12 +1179,12 @@ tape_mtop(struct tape_device *device, int mt_op, int mt_count) ...@@ -1176,12 +1179,12 @@ tape_mtop(struct tape_device *device, int mt_op, int mt_count)
static int static int
tape_init (void) tape_init (void)
{ {
tape_dbf_area = debug_register ( "tape", 1, 2, 4*sizeof(long)); TAPE_DBF_AREA = debug_register ( "tape", 1, 2, 4*sizeof(long));
debug_register_view(tape_dbf_area, &debug_sprintf_view); debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
#ifdef DBF_LIKE_HELL #ifdef DBF_LIKE_HELL
debug_set_level(tape_dbf_area, 6); debug_set_level(TAPE_DBF_AREA, 6);
#endif #endif
DBF_EVENT(3, "tape init: ($Revision: 1.49 $)\n"); DBF_EVENT(3, "tape init: ($Revision: 1.50 $)\n");
tape_proc_init(); tape_proc_init();
tapechar_init (); tapechar_init ();
tapeblock_init (); tapeblock_init ();
...@@ -1200,19 +1203,18 @@ tape_exit(void) ...@@ -1200,19 +1203,18 @@ tape_exit(void)
tapechar_exit(); tapechar_exit();
tapeblock_exit(); tapeblock_exit();
tape_proc_cleanup(); tape_proc_cleanup();
debug_unregister (tape_dbf_area); debug_unregister (TAPE_DBF_AREA);
} }
MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and " MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and "
"Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)"); "Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)");
MODULE_DESCRIPTION("Linux on zSeries channel attached " MODULE_DESCRIPTION("Linux on zSeries channel attached "
"tape device driver ($Revision: 1.49 $)"); "tape device driver ($Revision: 1.50 $)");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(tape_init); module_init(tape_init);
module_exit(tape_exit); module_exit(tape_exit);
EXPORT_SYMBOL(tape_dbf_area);
EXPORT_SYMBOL(tape_generic_remove); EXPORT_SYMBOL(tape_generic_remove);
EXPORT_SYMBOL(tape_generic_probe); EXPORT_SYMBOL(tape_generic_probe);
EXPORT_SYMBOL(tape_generic_online); EXPORT_SYMBOL(tape_generic_online);
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#define TAPE_DBF_AREA tape_core_dbf
#include "tape.h" #include "tape.h"
#define PRINTK_HEADER "TAPE_PROC: " #define PRINTK_HEADER "TAPE_PROC: "
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include <asm/tape390.h> #include <asm/tape390.h>
#define TAPE_DBF_AREA tape_core_dbf
#include "tape.h" #include "tape.h"
#include "tape_std.h" #include "tape_std.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment