X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fs390%2Fnet%2Fclaw.h;h=1a89d989f34811651d61dccd735fdf53f9701555;hb=96916090f488986a4ebb8e9ffa6a3b50881d5ccd;hp=1ee9a6f06541e93b3f67af32295bb0879b97d5eb;hpb=79acbb3ff2d8095b692e1502b9eb2ccec348de26;p=linux-2.6 diff --git a/drivers/s390/net/claw.h b/drivers/s390/net/claw.h index 1ee9a6f065..1a89d989f3 100644 --- a/drivers/s390/net/claw.h +++ b/drivers/s390/net/claw.h @@ -114,11 +114,20 @@ do { \ debug_event(claw_dbf_##name,level,(void*)(addr),len); \ } while (0) +/* Allow to sort out low debug levels early to avoid wasted sprints */ +static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level) +{ + return (level <= dbf_grp->level); +} + #define CLAW_DBF_TEXT_(level,name,text...) \ -do { \ - sprintf(debug_buffer, text); \ - debug_text_event(claw_dbf_##name,level, debug_buffer);\ -} while (0) + do { \ + if (claw_dbf_passes(claw_dbf_##name, level)) { \ + sprintf(debug_buffer, text); \ + debug_text_event(claw_dbf_##name, level, \ + debug_buffer); \ + } \ + } while (0) /******************************************************* * Define Control Blocks * @@ -278,8 +287,6 @@ struct claw_env { __u16 write_size; /* write buffer size */ __u16 dev_id; /* device ident */ __u8 packing; /* are we packing? */ - volatile __u8 queme_switch; /* gate for imed packing */ - volatile unsigned long pk_delay; /* Delay for adaptive packing */ __u8 in_use; /* device active flag */ struct net_device *ndev; /* backward ptr to the net dev*/ };