From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 25 00:05:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6236D106568B for ; Mon, 25 Jan 2010 00:05:49 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 11C888FC14 for ; Mon, 25 Jan 2010 00:05:48 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so137536qwd.7 for ; Sun, 24 Jan 2010 16:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=T1V75wkY5ERHw3mKC3hC7F1algpwZpZk+IraY0MrWZ0=; b=MdFKB5Ft872aOS7kxBYRwh3N1jKgXFwK/vOCcwdmCn7OSOjUTyCnsx8fFrJ5UddIDC ICrfCHsVBwwZ0mleWG7idIPFWGHl98A1sLl7jbbOQJDNuwL2drl3wJviWHPPSOyUl0bQ WcZD0o4T9p6rEtBzO9S2drvz2JsmcHq+cG+Qk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=fbpv+KsNokoyJQeHPD/dBINKexMjZ6ffvo84RBurKfb1AjDSfTzg04bqT+0r+2Zul8 zg0cwZ/LroSLcMS/Ue19C8Sz4Lpq43lzlE5D4ML8n7EeuQMRdgHW/R4g0MPwEL1pCy7B RqDti81ScGIff0gl9PZtN2wAVJRbSnkiNH8BA= Received: by 10.224.66.82 with SMTP id m18mr3728367qai.25.1264377947464; Sun, 24 Jan 2010 16:05:47 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 4sm15174957qwe.15.2010.01.24.16.05.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 24 Jan 2010 16:05:46 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 24 Jan 2010 16:05:44 -0800 From: Pyun YongHyeon Date: Sun, 24 Jan 2010 16:05:44 -0800 To: Nikolay Denev Message-ID: <20100125000544.GD1187@michelle.cdnetworks.com> References: <201001240101.54360.g.veniamin@googlemail.com> <20100124201739.GA1187@michelle.cdnetworks.com> <67E62F9E-3CEA-403D-A042-E7C552615EFC@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67E62F9E-3CEA-403D-A042-E7C552615EFC@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, zloidemon Subject: Re: ethernet SiS(190/191) problem driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 00:05:49 -0000 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@zlobook.local:/usr/obj/usr/src/sys/zlobook i386 > >> > >> none0@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@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@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