ethernet SiS(190/191) problem driver

Pyun YongHyeon pyunyh at gmail.com
Mon Jan 25 00:05:49 UTC 2010


On Mon, Jan 25, 2010 at 01:26:46AM +0200, Nikolay Denev wrote:
> On 24 Jan, 2010, at 22:17 , Pyun YongHyeon wrote:
> 
> > On Sun, Jan 24, 2010 at 01:01:53AM +0700, zloidemon wrote:
> >> Hi all!
> >> 
> >> zlobook# uname -a
> >> FreeBSD zlobook.local 8.0-STABLE FreeBSD 8.0-STABLE #22: Sun Jan  3 12:17:19 
> >> KRAT 2010     root at zlobook.local:/usr/obj/usr/src/sys/zlobook  i386
> >> 
> >> none0 at pci0:0:4:0:       class=0x020000 card=0x08021558 chip=0x01911039 
> >> rev=0x02 hdr=0x00
> >>    vendor     = 'Silicon Integrated Systems (SiS)'
> >>    device     = 'SIS190 (SIS190)'
> >>    class      = network
> >>    subclass   = ethernet
> >> 
> >> this is chip=0x01911039 real SiS191 ethernet card
> >> 
> > 
> > I'm not sure but SiS191 is gigabit controller so I guess you have a
> > variant of SiS190.
> > 
> >> i downloaded this is driver for sis 190 from http://pohoyda.gmxhome.de/sis190-
> >> freebsd-7.tar.gz
> >> 
> >> a problem when compiling....
> >> 
> >> zlobook# make
> >> Warning: Object directory not changed from original /root/123/sis190-FreeBSD-7
> >> @ -> /usr/src/sys
> >> machine -> /usr/src/sys/i386/include
> >> awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
> >> awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
> >> awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
> >> awk -f @/tools/makeobjops.awk @/dev/mii/miibus_if.m -h
> >> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -
> >> I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --
> >> param large-function-growth=1000 -fno-common  -mno-align-long-strings -
> >> mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 
> >> -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -
> >> Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -
> >> Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-
> >> extensions -c if_sis19x.c
> >> cc1: warnings being treated as errors
> >> if_sis19x.c:148: warning: pointer type mismatch in conditional expression
> >> *** Error code 1
> >> 
> >> Stop in /root/sis190-FreeBSD-7.
> >> 
> >> I made a patch for the driver. Now support SiS 191 and SiS 190. Tested only 
> >> SiS 191
> >> 
> > 
> > [...]
> > 
> >> i see a problem every 10-30 seconds
> >> 
> >> sis19x0: error_bits=0x40020001
> >> sis19x0: watchdog timeout
> >> sis19x0: watchdog timeout
> >> sis19x0: watchdog timeout
> >> sis19x0: watchdog timeout
> >> sis19x0: watchdog timeout
> >> sis19x0: watchdog timeout
> >> sis19x0: error_bits=0x40020001
> >> sis19x0: watchdog timeout
> >> 
> >> 64 bytes from 192.168.3.100: icmp_seq=52 ttl=128 time=0.256 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=53 ttl=128 time=0.272 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=54 ttl=128 time=0.294 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=55 ttl=128 time=4148.943 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=56 ttl=128 time=3150.245 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=57 ttl=128 time=2148.678 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=58 ttl=128 time=1148.346 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=59 ttl=128 time=147.464 ms
> >> 64 bytes from 192.168.3.100: icmp_seq=60 ttl=128 time=0.111 ms
> >> 
> >> somehow fix this possible?
> > 
> > Because I'm not familiar with the code, I'm not sure whether this
> > change is enough or not. If I remember correctly there were a
> > couple of request for SiS190/SiS191 support and Alexander Pohoyda
> > already wrote the driver for FreeBSD. The problem is I have no way
> > to test his driver because there seems to be no way to buy
> > stand-alone PCI/PCIe SiS190/SiS191 controller in market. All I can
> > find was LOM implementation.
> > Linux also has driver for SiS190/SiS191 and it has minimal support
> > code as SiS didn't release datasheet to open source developers. But
> > the code is relatively simple except using some magic values so I
> > guess Alexander Pohoyda can help you.
> > _______________________________________________
> > freebsd-hackers at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 
> I have a hacked up sis191 driver[*] based on Alexander Pohoyda's work and with some other additions from 
> Open Solaris and Linux.
> It has many ugly hacks right now, but It works (sort of) on my HP EX470 (there are hardcoded values for gbit speed right now).
> One of the problems I have is with the MTU, and I think this was fixed in Linux so there may be hope.
> But unfortunately the whole driver is full of magic values and the lack of documentation really doesn't help.
> 

I don't know what you're suffering from MTU but I wouldn't care
much about supporting jumbo frame unless controller hangs on 
receiving jumbo frames.
Last time I checked Alexander's driver, there were some locking
issues. If you're familiar with other ethernet controller/drivers
it would not be hard to guess meaning from the magic value.
Fluctuating ICMP ECHO response time indicates there are some
problems in TX path including interrupt handling. 

> [*] http://ndenev.ath.cx/if_sge/
> 

Thanks, I'll look over the code.

> 
> Regards,
> Niki


More information about the freebsd-hackers mailing list