Minor ibmtr patch

Joel Sloan (jjs@mail.outcast.org)
Fri, 1 Jan 1999 17:29:48 -0800 (PST)


Greetings,

We are using a number of ISA ibm-tr cards here, and the chattiness of the
card has always seemed excessive. In our case (we have a large, busy lan)
ibm-tr debug messages comprise about 80% of the syslog entries, e.g:

tr0: Line errors 01, Internal errors 00, Burst errors 00
A/C errors 00, Abort delimiters 00, Lost frames 00
Receive congestion count 00, Frame copied errors 00
Frequency errors FF, Token errors 00

I made a very minor mod to ibmtr.c to disable the copious messages by
default - they can be re-enabled with a 1 char edit in ibmtr.c

We have been pleased with the greatly increased signal/noise ratio in
dmesg output and in /var/log/messages - so it occurred to me that other
ibm-tr users might benefit from this small modification.

--- linux.vanilla/drivers/net/ibmtr.c Thu Dec 31 12:37:04 1998
+++ linux/drivers/net/ibmtr.c Thu Dec 31 12:36:50 1998
@@ -66,8 +66,17 @@
* + lifted 2000 byte mtu limit. now depends on shared-RAM size.
* May 25 1998)
* + can't allocate 2k recv buff at 8k shared-RAM. (20 October 1998)
+ *
+ * Changes by Joel Sloan (jjs@c-me.com) :
+ * + disable verbose debug messages by default - to enable verbose
+ * debugging, edit the IBMTR_DEBUG_MESSAGES define below
*/

+/* change the define of IBMTR_DEBUG_MESSAGES to a nonzero value
+in the event that chatty debug messages are desired - jjs 12/30/98 */
+
+#define IBMTR_DEBUG_MESSAGES 0
+
#ifdef PCMCIA
#define MODULE
#endif
@@ -95,7 +104,8 @@
/* version and credits */
static char *version =
"ibmtr.c: v1.3.57 8/ 7/94 Peter De Schrijver and Mark Swanson\n"
-" v2.1.125 10/20/98 Paul Norton <pnorton@ieee.org>\n";
+" v2.1.125 10/20/98 Paul Norton <pnorton@ieee.org>\n"
+" v2.2.0 12/30/98 Joel Sloan <jjs@c-me.com>\n";

static char pcchannelid[] = {
0x05, 0x00, 0x04, 0x09,
@@ -999,6 +1009,7 @@
DPRINTK("error on dir_read_log: %02X\n",
(int)readb(ti->srb+offsetof(struct srb_read_log, ret_code)));
else
+ if (IBMTR_DEBUG_MESSAGES) {
DPRINTK(
"Line errors %02X, Internal errors %02X, Burst errors %02X\n"
"A/C errors %02X, Abort delimiters %02X, Lost frames %02X\n"
@@ -1023,6 +1034,7 @@
frequency_errors)),
(int)readb(ti->srb+offsetof(struct srb_read_log,
token_errors)));
+ }
dev->tbusy=0;
break;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/