From owner-freebsd-drivers@FreeBSD.ORG Mon Feb 23 19:40:08 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C995D1065689 for ; Mon, 23 Feb 2009 19:40:08 +0000 (UTC) (envelope-from clamav@citromail.hu) Received: from server23.citromail.hu (server23.citromail.hu [91.83.45.23]) by mx1.freebsd.org (Postfix) with ESMTP id 1291B8FC08 for ; Mon, 23 Feb 2009 19:40:07 +0000 (UTC) (envelope-from clamav@citromail.hu) Received: (qmail 12143 invoked by uid 89); 23 Feb 2009 19:40:05 -0000 Message-ID: <20090223194005.12142.qmail@server23.citromail.hu> To: Received: from ktv-5B906329.pool.nagykanyar.hu [91.144.99.41] by with HTTP; Mon, 23 Feb 2009 20:40:05 +0100 From: "Tesch Zoltan" Date: Mon, 23 Feb 2009 20:40:05 +0100 Errors-To: X-Priority: 3 X-Mailer: VIPmail v.2.6 In-Reply-To: <20090223005416.GC48134@michelle.cdnetworks.co.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Subject: Re: debugging network device driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 19:40:09 -0000 Hi, Thanx a lot, I will try it Zoltan -- Eredeti =FCzenet -- Felad=F3: Pyun YongHyeon <pyunyh@gmail.com> C=EDmzett: Tesch Zoltan <clamav@citromail.hu> Elk=FCldve: 01:49 T=E9ma: Re: debugging network device driver On Sun, Feb 22, 2009 at 09:00:29AM +0100, Tesch Zoltan wrote: > Hi, >=20 > I have just tried to port SiS190 Linux driver to FreebBSD. It seems to > me that this driver looks like r8169 and for this reason my port is > based on the "re" device driver of FreeBSD 6.4. Hmm, I have no idea why SiS190 is similar to RTL8169. Both controllers have small set of registers though. > I can load the module, attach to SiS190 device, miibus and phy but whe= n > I try to set up the interface with ifconfig (ifconfig sis0 up) the > computer freezes. I have tried to print status information from my > driver (using printf`s in the code) but the last record in the log is > that miibus_readreg returned a good value, no other record is logged > into the system log. >=20 It's hard to say what was wrong here. Datasheet is not available to open source developers and the controller seem to have severe alignment restrictions as well as lack of auto-padding. > My questions: > Is there any way to switch to kernel debug mode in this situation to s= ee > what happened or is it possible to run the module under the supervisi= on > of kernel debugger running on the machine, because this laptop has no > serial line or any other network interface. >=20 ktr(4) is much better than printfs. Btw there was a post for SiS190 driver so you can reference his work. http://lists.freebsd.org/pipermail/freebsd-drivers/2008-April/000685.html Having a wired/wireless USB network controller would make your life easier.