From owner-freebsd-emulation@FreeBSD.ORG Fri Apr 28 22:15:31 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 211C216A400 for ; Fri, 28 Apr 2006 22:15:31 +0000 (UTC) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 605A143D49 for ; Fri, 28 Apr 2006 22:15:29 +0000 (GMT) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3SMFSRN009263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 29 Apr 2006 00:15:28 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k3SMFSbi009261; Sat, 29 Apr 2006 00:15:28 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.3/8.13.1) with ESMTP id k3SMBh91013104; Sat, 29 Apr 2006 00:11:43 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.3/8.13.1/Submit) id k3SMBhJC013103; Sat, 29 Apr 2006 00:11:43 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sat, 29 Apr 2006 00:11:43 +0200 To: Igor Kovalenko Message-ID: <20060428221142.GA11504@saturn.kn-bremen.de> Mail-Followup-To: Igor Kovalenko , qemu-devel@nongnu.org, freebsd-emulation@freebsd.org References: <20060427203718.GA15953@saturn.kn-bremen.de> <445241DE.9020909@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <445241DE.9020909@mail.ru> User-Agent: Mutt/1.4.2.1i Cc: freebsd-emulation@freebsd.org, qemu-devel@nongnu.org Subject: Re: playing with qemu's 8139 nic and FreeBSD (loopback mode missing?) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 22:15:31 -0000 On Fri, Apr 28, 2006 at 08:25:02PM +0400, Igor Kovalenko wrote: > Juergen Lock wrote: > > I played with > > qemu -monitor stdio -m 256 -cdrom 6.1-RC1-i386-disc1.iso -usb -soundhw es1370 -kernel-kqemu -net nic,model=rtl8139 -net user > > and got it as far as > > re0: diagnostic failed, failed to receive packet in loopback mode > > (followed by a panic :) with the (experimental) patches below. > > > > Anyone in the mood to implement loopback mode for this nic? > > > > Hmm actually... I just found the original posting in the archive, > > is C+ mode implemented now? If not re is probably not what I want, > > The rtl8139 is set up with PCI rev ID 0x20 which should be enough for OS driver > to detect C+ mode features. C+ mode is OK, tested with Linux driver. Cool, so I want FreeBSD's re driver. That one checks TxConfig tho, as changed in my patch (inside #if 0). And when changed, it still doesn't work as mentioned above because the driver expects loopback mode to be working. > > > but the rl driver that it attaches without that #if 0'd (now) hunk > > below doesnt seem to be able to get data thru either and I get > > rl0: watchdog timeout > > in dmesg, which usually means the driver doesnt receive interrupts. > > > > What the heck, I'll append a log of a run just doing in fixit->cdrom: > > ifconfig rl0 10.0.2.15 > > and then exiting (which is enough to trigger the watchdog timeout...) > > > > I'm too lasy to test with fresh freebsd installation :) No need to install FreeBSD, you can get away by just using fixit mode of an install iso, i.e. disc1. (which actually is what I did above. :) You can look at 6.1RC's re driver here: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/re/if_re.c?annotate=1.46.2.14 which includes: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/pci/if_rlreg.h?annotate=1.51.2.3 And 6.1RC disc1 iso is e.g. here: ftp://ftp.ru.freebsd.org:/pub/FreeBSD/ISO-IMAGES-i386/6.1/6.1-RC1-i386-disc1.iso