From owner-freebsd-net@FreeBSD.ORG Wed Feb 7 00:37:34 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 194B416A403 for ; Wed, 7 Feb 2007 00:37:29 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by mx1.freebsd.org (Postfix) with ESMTP id B6E2013C461 for ; Wed, 7 Feb 2007 00:37:28 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so50623nzh for ; Tue, 06 Feb 2007 16:37:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=ikOh20vDj/Pjp2lWxKGVcSi2EcFjvuCsCWtkNCJm/eQnej0xLYP4y5ubAjiKu98PYqDvo10zMPd+AgsgHm2sL6Tv0Bt5AKSHEyZoRk3QogEh4rZX6aV253hlYetxxnzVu9AaA7ADJOYx43xnVr0K7Qlr0J0euhRWQusg/Q537f4= Received: by 10.35.60.15 with SMTP id n15mr13768778pyk.1170808647710; Tue, 06 Feb 2007 16:37:27 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id 39sm834846nzk.2007.02.06.16.37.25; Tue, 06 Feb 2007 16:37:26 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l170c3BM038158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Feb 2007 09:38:03 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l170buDO038157; Wed, 7 Feb 2007 09:37:56 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 7 Feb 2007 09:37:56 +0900 From: Pyun YongHyeon To: Ed Schouten Message-ID: <20070207003756.GA37911@cdnetworks.co.kr> References: <20070206204314.GB27282@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070206204314.GB27282@hoeg.nl> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org, shigeaki@se.hiroshima-u.ac.jp, rink@stack.nl Subject: Re: icsphy(4) for nfe(4) - better Microsoft Xbox support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2007 00:37:34 -0000 On Tue, Feb 06, 2007 at 09:43:14PM +0100, Ed Schouten wrote: > Hello, > > When we (Rink and I) ported FreeBSD to the Xbox, Rink patched the kernel > to allow the nve(4) driver to attach properly. I recently removed the > dust from my Xbox and installed FreeBSD on it. This time I started using > the nfe(4) driver. > > When compared to the nve(4) driver, the nfe(4) seems a lot faster (and > not as interrupt-hungry). I did have some issues with it, however. When Would you try overhauled nfe(4)? http://people.freebsd.org/~yongari/nfe/if_nfe.c http://people.freebsd.org/~yongari/nfe/if_nfereg.c http://people.freebsd.org/~yongari/nfe/if_nfevar.c The new nfe(4) should perform better than nve(4) or stock nfe(4). I'm still not satisfied with its excessive generation of interrtups but it's better than stock nfe(4). After switching to adaptive polling I saw noticeable performance boost. If you find any issues please let me know. > the machine boots, I often have to plug out/in the network cable before > I get a link. My switch, a HP2626, sometimes temporarily shuts down the > port with the message: > > FFI: port 9-Excessive CRC/alignment errors. See help. > > Because the issues seemed more link-related, I tried looking at the phy > code. After booting my machine with bootverbose, it seems I had an > ICS1893 PHY, using the ukphy(4) driver. NetBSD has a driver for it, > called icsphy(4). I decided to port it to FreeBSD. > > Porting was quite easy. Just smack the C file in the tree and edit it > until it compiles. I had some problems at first, because even with the > icsphy(4) driver I didn't get a link. I discovered that the BMSR > register kept returning BMSR_ISO, until I unplugged the cable. I added > MIIF_NOISOLATE to the mii_flags and voila: it works. > > I can now boot my Xbox without plugging around all the time. The > CRC/alignment errors have also vanished. > > http://g-rave.nl/junk/freebsd-icsphy.diff > > Yours, > -- > Ed Schouten > WWW: http://g-rave.nl/ -- Regards, Pyun YongHyeon