Subject: sk gigabit ethernet driver
To: None <tech-net@netbsd.org>
From: Paul Ripke <stix@stix.homeunix.net>
List: tech-net
Date: 07/16/2004 00:17:45
I picked up a new machine late last week for my home server. The
MB is an ASUS P4P800-E Deluxe with onboard Marvell/SysKonnect
Yukon gigabit ethernet, supported by the sk driver.

I've been trying to get NetBSD 2.0 BETA running on this thing,
mostly with great success (including hyperthreading), except
for the gigabit ethernet.

4 out of every 5 boots results in no outbound packets. Setting
skdebug reveals that sk_encap is succeeding, but the tx complete
interrupt never arrives (sk_intr -> sk_txeof). Running traces on
other machines show no packet hits the wire. Shortly afterwards,
a watchdog timeout resets the card, which doesn't appear to help.
Then, if left long enough, "sk_encap: no txmap available" is
generated.

This problem seems to be made worse if dhclient is used to
configure the card. 9 times out of 10 boots, none of the dhcp
packets hit the wire.

When the card does work, it locks up under any sort of transmit
load, with a similar pattern to the above.

Looking at the code, shouldn't sk_stop return tx/rx dma descriptors
to the appropriate lists when freeing the mbufs? I think this is the
cause of the "sk_encap: no txmap available", but doesn't help the
watchdog timeouts.

Surfing around, the original problem appears to be FreeBSD
kern/67818, with no patch available. I can't seem to figure out
what's going on, nor can I find the cited "SysKonnect GEnesis
manual" which may help, although I'm still getting the hang of
these device drivers.

Also checked the {Free,Open}BSD drivers, I can't see any
differences that are relevant to this particular problem. I just
tried disabling interrupt moderation, no noticeable effect.

One thing I have noticed, is that it will work far more reliably
with skdebug set > 0 before boot. Guessing this is some obscure
timing bug somewhere, and the debugging is adding a small delay
in the critical path.

Is anyone looking at this? Should I send-pr with what I have thus
far?

Card is:
002:05:0: Galileo Technology SK-NET Gigabit Ethernet (ethernet network, 
revision 0x13)

Cheers,
--
stix