public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 3c59x.c - kernel message explosion (fwd)
@ 2002-04-03 23:39 Denny Gudea
  2002-04-03 23:49 ` Jeff Garzik
  2002-04-03 23:59 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Denny Gudea @ 2002-04-03 23:39 UTC (permalink / raw)
  To: andrewm, netdev, linux-kernel


Hi,

id like to thank you for maintaining this driver..

i have a 3com 3c905 and im using 3c59x.c driver to run it in my linux
machine. it is connected to a hub on a network with 7 nodes. it seems like
one of the hosts on my network has a duplex problem (as is described in
vortex.txt). the problem i'm having is that the driver does a lot of
kernel messages for this error even though my debug is set to the default.

i've looked at the code and the problem seems to be due to a small typo:
this code segment begins at line 1826:
------------------------------------------------
       if (status & TxComplete) {                      /* Really "TxError" for us. */
                tx_status = inb(ioaddr + TxStatus);
                /* Presumably a tx-timeout. We must merely re-enable. */
                if (vortex_debug > 2
                        || (tx_status != 0x88 && vortex_debug > 0)) {
                        printk(KERN_ERR "%s: Transmit error, Tx status register %2.2x.\n",
                                   dev->name, tx_status);
                        if (tx_status == 0x82) {
                                printk(KERN_ERR "Probably a duplex mismatch.  See "
                                                "Documentation/networking/vortex.txt\n");
                        }
                        dump_tx_ring(dev);
-------------------------------------------------
i believe the problem resides when it tests for the debug level:

	          if (vortex_debug > 2
                        || (tx_status != 0x88 && vortex_debug > 0)) {

the || operator should be a && because we only want to print the error
message if debug is greater than 2 and the transmit status is not what it
should be.



thanks a lot

denny gudea
ekay@ecs.fullerton.edu



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 3c59x.c - kernel message explosion (fwd)
  2002-04-03 23:39 3c59x.c - kernel message explosion (fwd) Denny Gudea
@ 2002-04-03 23:49 ` Jeff Garzik
  2002-04-04  0:08   ` Denny Gudea
  2002-04-03 23:59 ` Andrew Morton
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2002-04-03 23:49 UTC (permalink / raw)
  To: Denny Gudea; +Cc: andrewm, netdev, linux-kernel

Denny Gudea wrote:
> i believe the problem resides when it tests for the debug level:
> 
> 	          if (vortex_debug > 2
>                         || (tx_status != 0x88 && vortex_debug > 0)) {
> 
> the || operator should be a && because we only want to print the error
> message if debug is greater than 2 and the transmit status is not what it
> should be.



the test looks ok...  it prints if the status is not what it should be, 
if vortex_debug is 1 or 2, and unconditionally prints the status if 
vortex_debug is 3 or greater.

What is your vortex_debug setting?

	Jeff





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 3c59x.c - kernel message explosion (fwd)
  2002-04-03 23:39 3c59x.c - kernel message explosion (fwd) Denny Gudea
  2002-04-03 23:49 ` Jeff Garzik
@ 2002-04-03 23:59 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2002-04-03 23:59 UTC (permalink / raw)
  To: Denny Gudea; +Cc: netdev, linux-kernel

Denny Gudea wrote:
> 
> Hi,
> 
> id like to thank you for maintaining this driver..
> 
> i have a 3com 3c905 and im using 3c59x.c driver to run it in my linux
> machine. it is connected to a hub on a network with 7 nodes. it seems like
> one of the hosts on my network has a duplex problem (as is described in
> vortex.txt). the problem i'm having is that the driver does a lot of
> kernel messages for this error even though my debug is set to the default.
> 
> i've looked at the code and the problem seems to be due to a small typo:
> this code segment begins at line 1826:
> ------------------------------------------------
>        if (status & TxComplete) {                      /* Really "TxError" for us. */
>                 tx_status = inb(ioaddr + TxStatus);
>                 /* Presumably a tx-timeout. We must merely re-enable. */
>                 if (vortex_debug > 2
>                         || (tx_status != 0x88 && vortex_debug > 0)) {
>                         printk(KERN_ERR "%s: Transmit error, Tx status register %2.2x.\n",
>                                    dev->name, tx_status);
>                         if (tx_status == 0x82) {
>                                 printk(KERN_ERR "Probably a duplex mismatch.  See "
>                                                 "Documentation/networking/vortex.txt\n");
>                         }
>                         dump_tx_ring(dev);
> -------------------------------------------------
> i believe the problem resides when it tests for the debug level:
> 
>                   if (vortex_debug > 2
>                         || (tx_status != 0x88 && vortex_debug > 0)) {

The code is OK, I think.  It says, in a rather tortured manner,
"if debug > 0 then print stuff, unless it is a max-collisions-exceeded
event" and "if debug > 2 then print all events".

Probably many of these driver messages should be throttled
by net_ratelimit() but in practice, things work out OK.

Your machine is a special case, because your network is
bust.  The default value of `debug' is 1.  If you set
it to zero, those messages should go away?

-

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 3c59x.c - kernel message explosion (fwd)
  2002-04-03 23:49 ` Jeff Garzik
@ 2002-04-04  0:08   ` Denny Gudea
  0 siblings, 0 replies; 4+ messages in thread
From: Denny Gudea @ 2002-04-04  0:08 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel

you are correct.. i am a newbie.. my debug is set to the default (1)i
didnt see that last vortex_debug..

the machine i have this nic on visits several networks.. as this code
suggests, maybe this is a more serious error than i thought. this machine
has been tested in several networks, and seems to be happening everywhere
for me.

can you guys give me any clues to finding the culprit on the
network? the condition is easily created for me..

thanks for your help

denny gudea
ekay@ecs.fullerton.edu

On Wed, 3 Apr 2002, Jeff Garzik wrote:

> Denny Gudea wrote:
> > i believe the problem resides when it tests for the debug level:
> >
> > 	          if (vortex_debug > 2
> >                         || (tx_status != 0x88 && vortex_debug > 0)) {
> >
> > the || operator should be a && because we only want to print the error
> > message if debug is greater than 2 and the transmit status is not what it
> > should be.
>
>
>
> the test looks ok...  it prints if the status is not what it should be,
> if vortex_debug is 1 or 2, and unconditionally prints the status if
> vortex_debug is 3 or greater.
>
> What is your vortex_debug setting?
>
> 	Jeff
>
>
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-04  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-03 23:39 3c59x.c - kernel message explosion (fwd) Denny Gudea
2002-04-03 23:49 ` Jeff Garzik
2002-04-04  0:08   ` Denny Gudea
2002-04-03 23:59 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox