From owner-freebsd-drivers@FreeBSD.ORG Mon Feb 23 01:20:12 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 A180210656C3 for ; Mon, 23 Feb 2009 01:20:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by mx1.freebsd.org (Postfix) with ESMTP id 38D5A8FC18 for ; Mon, 23 Feb 2009 01:20:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so1181273tib.3 for ; Sun, 22 Feb 2009 17:20:11 -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=bXzwur+8pJM+7FJgXcr2e1L8UR9nvvNs9UkobtoSHgE=; b=nE+qd2NDx5qwR9zMb5sj1fVfZlwEsZE7swlrDZ+TB8aBOSjlS8N/RlKPR2nvphMcw6 tpP6tP0SzQgit/IGM7Yhb4tAW046TXwmX3gRVqVPxzyr43dX+0ttaYns9dlDqctIiSx3 OESlEb0he0ZuIKZ0noCmbLVLCykoLDVhnGXEY= 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=NNu4DKfSsozanfv3TCTFMvqNG3HrqgedqvcqyVJT4V/4AEEoUOEBPUuoAQN1XV3uH9 J1BG+2gH15meQJqg8yE0Q1jIPUnDWIDzsLNRfowTdkaU9+L++MymvMitrbem00wvnwpF 1KVimWSET2O1KGD1QIr2+eYt1u+Q0HM3If1nA= Received: by 10.110.73.19 with SMTP id v19mr4950506tia.40.1235350161630; Sun, 22 Feb 2009 16:49:21 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([114.111.62.249]) by mx.google.com with ESMTPS id j5sm8222044tid.1.2009.02.22.16.49.18 (version=SSLv3 cipher=RC4-MD5); Sun, 22 Feb 2009 16:49:20 -0800 (PST) Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation); Mon, 23 Feb 2009 09:54:16 +0900 From: Pyun YongHyeon Date: Mon, 23 Feb 2009 09:54:16 +0900 To: Tesch Zoltan Message-ID: <20090223005416.GC48134@michelle.cdnetworks.co.kr> References: <20090222080029.3900.qmail@server23.citromail.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090222080029.3900.qmail@server23.citromail.hu> User-Agent: Mutt/1.4.2.3i Cc: freebsd-drivers@freebsd.org Subject: Re: debugging network device driver X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com 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 01:20:13 -0000 On Sun, Feb 22, 2009 at 09:00:29AM +0100, Tesch Zoltan wrote: > Hi, > > 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 when > 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. > 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 see > what happened or is it possible to run the module under the supervision > of kernel debugger running on the machine, because this laptop has no > serial line or any other network interface. > 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.