Commit 61ebd810 authored by Peter Tiedemann's avatar Peter Tiedemann Committed by Linus Torvalds

[PATCH] s390: ctc driver changes.

Prefix debug feature variables with ctc to avoid name space problems.
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 1813219b
/*
*
* linux/drivers/s390/net/ctcdbug.c ($Revision: 1.2 $)
* linux/drivers/s390/net/ctcdbug.c ($Revision: 1.4 $)
*
* CTC / ESCON network driver - s390 dbf exploit.
*
......@@ -9,7 +9,7 @@
* Author(s): Original Code written by
* Peter Tiedemann (ptiedem@de.ibm.com)
*
* $Revision: 1.2 $ $Date: 2004/07/15 16:03:08 $
* $Revision: 1.4 $ $Date: 2004/08/04 10:11:59 $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -31,51 +31,51 @@
/**
* Debug Facility Stuff
*/
debug_info_t *dbf_setup = NULL;
debug_info_t *dbf_data = NULL;
debug_info_t *dbf_trace = NULL;
debug_info_t *ctc_dbf_setup = NULL;
debug_info_t *ctc_dbf_data = NULL;
debug_info_t *ctc_dbf_trace = NULL;
DEFINE_PER_CPU(char[256], dbf_txt_buf);
DEFINE_PER_CPU(char[256], ctc_dbf_txt_buf);
void
unregister_dbf_views(void)
ctc_unregister_dbf_views(void)
{
if (dbf_setup)
debug_unregister(dbf_setup);
if (dbf_data)
debug_unregister(dbf_data);
if (dbf_trace)
debug_unregister(dbf_trace);
if (ctc_dbf_setup)
debug_unregister(ctc_dbf_setup);
if (ctc_dbf_data)
debug_unregister(ctc_dbf_data);
if (ctc_dbf_trace)
debug_unregister(ctc_dbf_trace);
}
int
register_dbf_views(void)
ctc_register_dbf_views(void)
{
dbf_setup = debug_register(CTC_DBF_SETUP_NAME,
ctc_dbf_setup = debug_register(CTC_DBF_SETUP_NAME,
CTC_DBF_SETUP_INDEX,
CTC_DBF_SETUP_NR_AREAS,
CTC_DBF_SETUP_LEN);
dbf_data = debug_register(CTC_DBF_DATA_NAME,
ctc_dbf_data = debug_register(CTC_DBF_DATA_NAME,
CTC_DBF_DATA_INDEX,
CTC_DBF_DATA_NR_AREAS,
CTC_DBF_DATA_LEN);
dbf_trace = debug_register(CTC_DBF_TRACE_NAME,
ctc_dbf_trace = debug_register(CTC_DBF_TRACE_NAME,
CTC_DBF_TRACE_INDEX,
CTC_DBF_TRACE_NR_AREAS,
CTC_DBF_TRACE_LEN);
if ((dbf_setup == NULL) || (dbf_data == NULL) ||
(dbf_trace == NULL)) {
unregister_dbf_views();
if ((ctc_dbf_setup == NULL) || (ctc_dbf_data == NULL) ||
(ctc_dbf_trace == NULL)) {
ctc_unregister_dbf_views();
return -ENOMEM;
}
debug_register_view(dbf_setup, &debug_hex_ascii_view);
debug_set_level(dbf_setup, CTC_DBF_SETUP_LEVEL);
debug_register_view(ctc_dbf_setup, &debug_hex_ascii_view);
debug_set_level(ctc_dbf_setup, CTC_DBF_SETUP_LEVEL);
debug_register_view(dbf_data, &debug_hex_ascii_view);
debug_set_level(dbf_data, CTC_DBF_DATA_LEVEL);
debug_register_view(ctc_dbf_data, &debug_hex_ascii_view);
debug_set_level(ctc_dbf_data, CTC_DBF_DATA_LEVEL);
debug_register_view(dbf_trace, &debug_hex_ascii_view);
debug_set_level(dbf_trace, CTC_DBF_TRACE_LEVEL);
debug_register_view(ctc_dbf_trace, &debug_hex_ascii_view);
debug_set_level(ctc_dbf_trace, CTC_DBF_TRACE_LEVEL);
return 0;
}
......
/*
*
* linux/drivers/s390/net/ctcdbug.h ($Revision: 1.2 $)
* linux/drivers/s390/net/ctcdbug.h ($Revision: 1.3 $)
*
* CTC / ESCON network driver - s390 dbf exploit.
*
......@@ -9,7 +9,7 @@
* Author(s): Original Code written by
* Peter Tiedemann (ptiedem@de.ibm.com)
*
* $Revision: 1.2 $ $Date: 2004/07/15 16:03:08 $
* $Revision: 1.3 $ $Date: 2004/07/28 12:27:54 $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -51,38 +51,38 @@
#define DBF_TEXT(name,level,text) \
do { \
debug_text_event(dbf_##name,level,text); \
debug_text_event(ctc_dbf_##name,level,text); \
} while (0)
#define DBF_HEX(name,level,addr,len) \
do { \
debug_event(dbf_##name,level,(void*)(addr),len); \
debug_event(ctc_dbf_##name,level,(void*)(addr),len); \
} while (0)
extern DEFINE_PER_CPU(char[256], dbf_txt_buf);
extern debug_info_t *dbf_setup;
extern debug_info_t *dbf_data;
extern debug_info_t *dbf_trace;
extern DEFINE_PER_CPU(char[256], ctc_dbf_txt_buf);
extern debug_info_t *ctc_dbf_setup;
extern debug_info_t *ctc_dbf_data;
extern debug_info_t *ctc_dbf_trace;
#define DBF_TEXT_(name,level,text...) \
do { \
char* dbf_txt_buf = get_cpu_var(dbf_txt_buf); \
sprintf(dbf_txt_buf, text); \
debug_text_event(dbf_##name,level,dbf_txt_buf); \
put_cpu_var(dbf_txt_buf); \
char* ctc_dbf_txt_buf = get_cpu_var(ctc_dbf_txt_buf); \
sprintf(ctc_dbf_txt_buf, text); \
debug_text_event(ctc_dbf_##name,level,ctc_dbf_txt_buf); \
put_cpu_var(ctc_dbf_txt_buf); \
} while (0)
#define DBF_SPRINTF(name,level,text...) \
do { \
debug_sprintf_event(dbf_trace, level, ##text ); \
debug_sprintf_event(dbf_trace, level, text ); \
debug_sprintf_event(ctc_dbf_trace, level, ##text ); \
debug_sprintf_event(ctc_dbf_trace, level, text ); \
} while (0)
int register_dbf_views(void);
int ctc_register_dbf_views(void);
void unregister_dbf_views(void);
void ctc_unregister_dbf_views(void);
/**
* some more debug stuff
......
/*
* $Id: ctcmain.c,v 1.62 2004/07/15 16:03:08 ptiedem Exp $
* $Id: ctcmain.c,v 1.63 2004/07/28 12:27:54 ptiedem Exp $
*
* CTC / ESCON network driver
*
......@@ -36,7 +36,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.62 $
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.63 $
*
*/
......@@ -320,7 +320,7 @@ static void
print_banner(void)
{
static int printed = 0;
char vbuf[] = "$Revision: 1.62 $";
char vbuf[] = "$Revision: 1.63 $";
char *version = vbuf;
if (printed)
......@@ -3250,7 +3250,7 @@ ctc_exit(void)
{
unregister_cu3088_discipline(&ctc_group_driver);
ctc_tty_cleanup();
unregister_dbf_views();
ctc_unregister_dbf_views();
ctc_pr_info("CTC driver unloaded\n");
}
......@@ -3267,16 +3267,16 @@ ctc_init(void)
print_banner();
ret = register_dbf_views();
ret = ctc_register_dbf_views();
if (ret){
ctc_pr_crit("ctc_init failed with register_dbf_views rc = %d\n", ret);
ctc_pr_crit("ctc_init failed with ctc_register_dbf_views rc = %d\n", ret);
return ret;
}
ctc_tty_init();
ret = register_cu3088_discipline(&ctc_group_driver);
if (ret) {
ctc_tty_cleanup();
unregister_dbf_views();
ctc_unregister_dbf_views();
}
return ret;
}
......
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