diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 19:09:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 19:09:51 -0700 |
commit | c010b2f76c3032e48097a6eef291d8593d5d79a6 (patch) | |
tree | 16077c83703527732991a55dea1abe330c0ccdc6 /drivers/s390/net/ctcm_dbug.h | |
parent | 6069fb2ef5d4f47432359c97f350e0cfcc4d208e (diff) | |
parent | 521c4d96e0840ecce25b956e00f416ed499ef2ba (diff) | |
download | linux-c010b2f76c3032e48097a6eef291d8593d5d79a6.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (82 commits)
ipw2200: Call netif_*_queue() interfaces properly.
netxen: Needs to include linux/vmalloc.h
[netdrvr] atl1d: fix !CONFIG_PM build
r6040: rework init_one error handling
r6040: bump release number to 0.18
r6040: handle RX fifo full and no descriptor interrupts
r6040: change the default waiting time
r6040: use definitions for magic values in descriptor status
r6040: completely rework the RX path
r6040: call napi_disable when puting down the interface and set lp->dev accordingly.
mv643xx_eth: fix NETPOLL build
r6040: rework the RX buffers allocation routine
r6040: fix scheduling while atomic in r6040_tx_timeout
r6040: fix null pointer access and tx timeouts
r6040: prefix all functions with r6040
rndis_host: support WM6 devices as modems
at91_ether: use netstats in net_device structure
sfc: Create one RX queue and interrupt per CPU package by default
sfc: Use a separate workqueue for resets
sfc: I2C adapter initialisation fixes
...
Diffstat (limited to 'drivers/s390/net/ctcm_dbug.h')
-rw-r--r-- | drivers/s390/net/ctcm_dbug.h | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/drivers/s390/net/ctcm_dbug.h b/drivers/s390/net/ctcm_dbug.h index fdff34fe59a2..26966d0b9abd 100644 --- a/drivers/s390/net/ctcm_dbug.h +++ b/drivers/s390/net/ctcm_dbug.h @@ -20,16 +20,17 @@ #else #define do_debug 0 #endif -#ifdef DEBUGDATA - #define do_debug_data 1 -#else - #define do_debug_data 0 -#endif #ifdef DEBUGCCW #define do_debug_ccw 1 + #define DEBUGDATA 1 #else #define do_debug_ccw 0 #endif +#ifdef DEBUGDATA + #define do_debug_data 1 +#else + #define do_debug_data 0 +#endif /* define dbf debug levels similar to kernel msg levels */ #define CTC_DBF_ALWAYS 0 /* always print this */ @@ -42,8 +43,6 @@ #define CTC_DBF_INFO 5 /* informational */ #define CTC_DBF_DEBUG 6 /* debug-level messages */ -DECLARE_PER_CPU(char[256], ctcm_dbf_txt_buf); - enum ctcm_dbf_names { CTCM_DBF_SETUP, CTCM_DBF_ERROR, @@ -67,6 +66,7 @@ extern struct ctcm_dbf_info ctcm_dbf[CTCM_DBF_INFOS]; int ctcm_register_dbf_views(void); void ctcm_unregister_dbf_views(void); +void ctcm_dbf_longtext(enum ctcm_dbf_names dbf_nix, int level, char *text, ...); static inline const char *strtail(const char *s, int n) { @@ -74,12 +74,6 @@ static inline const char *strtail(const char *s, int n) return (l > n) ? s + (l - n) : s; } -/* sort out levels early to avoid unnecessary sprintfs */ -static inline int ctcm_dbf_passes(debug_info_t *dbf_grp, int level) -{ - return (dbf_grp->level >= level); -} - #define CTCM_FUNTAIL strtail((char *)__func__, 16) #define CTCM_DBF_TEXT(name, level, text) \ @@ -94,16 +88,7 @@ static inline int ctcm_dbf_passes(debug_info_t *dbf_grp, int level) } while (0) #define CTCM_DBF_TEXT_(name, level, text...) \ - do { \ - if (ctcm_dbf_passes(ctcm_dbf[CTCM_DBF_##name].id, level)) { \ - char *ctcm_dbf_txt_buf = \ - get_cpu_var(ctcm_dbf_txt_buf); \ - sprintf(ctcm_dbf_txt_buf, text); \ - debug_text_event(ctcm_dbf[CTCM_DBF_##name].id, \ - level, ctcm_dbf_txt_buf); \ - put_cpu_var(ctcm_dbf_txt_buf); \ - } \ - } while (0) + ctcm_dbf_longtext(CTCM_DBF_##name, level, text) /* * cat : one of {setup, mpc_setup, trace, mpc_trace, error, mpc_error}. @@ -112,13 +97,13 @@ static inline int ctcm_dbf_passes(debug_info_t *dbf_grp, int level) */ #define CTCM_DBF_DEV_NAME(cat, dev, text) \ do { \ - CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%s) : %s", \ + CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%s) :- %s", \ CTCM_FUNTAIL, dev->name, text); \ } while (0) #define MPC_DBF_DEV_NAME(cat, dev, text) \ do { \ - CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%s) : %s", \ + CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%s) := %s", \ CTCM_FUNTAIL, dev->name, text); \ } while (0) @@ -137,13 +122,13 @@ static inline int ctcm_dbf_passes(debug_info_t *dbf_grp, int level) */ #define CTCM_DBF_DEV(cat, dev, text) \ do { \ - CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%p) : %s", \ + CTCM_DBF_TEXT_(cat, CTC_DBF_INFO, "%s(%p) :-: %s", \ CTCM_FUNTAIL, dev, text); \ } while (0) #define MPC_DBF_DEV(cat, dev, text) \ do { \ - CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%p) : %s", \ + CTCM_DBF_TEXT_(MPC_##cat, CTC_DBF_INFO, "%s(%p) :=: %s", \ CTCM_FUNTAIL, dev, text); \ } while (0) |