2001-02-06 02:30:03

by Misc Mail for Erich

[permalink] [raw]
Subject: FA-311 / Natsemi problems with 2.4.1


I'm having problems with the natsemi drivers on my Netgear FA-311 card.

On one host, I get lots of messages like this:

eth1: Something Wicked happened! 0700.
eth1: Something Wicked happened! 0740.
eth1: Something Wicked happened! 0740.
eth1: Something Wicked happened! 0740.
eth1: Something Wicked happened! 0740.
eth1: Something Wicked happened! 0740.
eth1: Something Wicked happened! 0540.

This is on a K6-166

On my athlon/duron, I don't get those messages, but once in a while it will
just stop working. If I bring the interface down, remove the module, and
bring the interface back up again it will start to work again.

These two cards are connected by a crossover cable. When the cards are
working the link works just fine.

What more information do I need to obtain? Please cc me, though I'll
be watching the list archives as well.



2001-02-06 18:29:47

by Jocelyn Mayer

[permalink] [raw]
Subject: Re: FA-311 / Natsemi problems with 2.4.1

Well, I know this problem very well....

It seems that the original driver has some problems
to set up the chip and flush its receive buffers before
transmitting them.
I made some patches to make this chip work well.
I have one for 2.2.17 kernel, and one for 2.4.0 one.
I sent this patch to D. Becker some time ago,
but he never replied me, and, as far as I know,
never integrated it.

Here's my version for 2.2.17 kernel.
I made it work very well for a few weeks.
It's a bzip2 attachement,
as it is a bit long....
I'll send my patch for 2.4 kernel
as soon as I have finished to clean it up !!!

Jocelyn Mayer


Attachments:
natsemi.c.bz2 (13.33 kB)

2001-02-06 19:31:55

by Manfred Spraul

[permalink] [raw]
Subject: Re: FA-311 / Natsemi problems with 2.4.1

Jocelyn Mayer wrote:
>
> I'll send my patch for 2.4 kernel
> as soon as I have finished to clean it up !!!
>

A few points:

* set your tabs to 8, and indent by 8 characters.
* Nastemi_auto_negociate: remove the 'static' variable - what if someone
has multiple cards installed?
* You cannot wait for for more than a few dozend microseconds in an
hardware interrupt handle, and a few hundred microseconds in a bottom
half handler (e.g a timer)
Probably the autonegotiation takes longer - add a timer that calls you
back after 50 milliseconds, and return.

And are you sure that a full reset is required for a simple link change?

Most other drivers are written the other way around:
tx_timeout() performs the full reset if the transmitter is hung for > 2
seconds, and link_change only changes the chip configuration.


--
Manfred

2001-02-06 21:19:32

by Jocelyn Mayer

[permalink] [raw]
Subject: Re: FA-311 / Natsemi problems with 2.4.1

I found something from OpenBSD:
the natsemi chip (in fact DP83815)
is quite the same as SiS900 one.
You'll find as attachement the driver code
from OpenBSD.
If someone wo knows something about OpenBSD driver
could merge the driver drivers into Linux,
I think it would be a real great deal !

Jocelyn Mayer



Attachments:
openBSD-national.tgz (14.77 kB)

2001-02-06 23:29:31

by Jeff Garzik

[permalink] [raw]
Subject: Re: FA-311 / Natsemi problems with 2.4.1

Jocelyn Mayer wrote:
>
> I found something from OpenBSD:
> the natsemi chip (in fact DP83815)
> is quite the same as SiS900 one.

If that is true, maybe you can hack drivers/net/sis900.c to get it to
work with the FA-311?

Jeff



--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie

2001-02-07 01:50:07

by Ben Pharr

[permalink] [raw]
Subject: Re: FA-311 / Natsemi problems with 2.4.1

At 05:28 PM 2/6/01 , you wrote:
>Jocelyn Mayer wrote:
> >
> > I found something from OpenBSD:
> > the natsemi chip (in fact DP83815)
> > is quite the same as SiS900 one.
>
>If that is true, maybe you can hack drivers/net/sis900.c to get it to
>work with the FA-311?
>
> Jeff


My FA311 works fine with the natsemi driver.

Ben Pharr
[email protected]
-------------