From owner-freebsd-net@FreeBSD.ORG Tue Feb 6 21:12:57 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 A0C5016A402 for ; Tue, 6 Feb 2007 21:12:57 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.freebsd.org (Postfix) with ESMTP id 6A08A13C4B5 for ; Tue, 6 Feb 2007 21:12:57 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 5CEBB1CCC3; Tue, 6 Feb 2007 21:43:14 +0100 (CET) Date: Tue, 6 Feb 2007 21:43:14 +0100 From: Ed Schouten To: freebsd-net@freebsd.org Message-ID: <20070206204314.GB27282@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J9YdZykiGPT3Jhx7" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Cc: shigeaki@se.hiroshima-u.ac.jp, rink@stack.nl Subject: icsphy(4) for nfe(4) - better Microsoft Xbox support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 21:12:57 -0000 --J9YdZykiGPT3Jhx7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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, --=20 Ed Schouten WWW: http://g-rave.nl/ --J9YdZykiGPT3Jhx7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFyOhi52SDGA2eCwURAkggAJ9WPbUAycUHVk/JoUraX673bu3PWwCdEFU+ /jIABAOhNZo7RtSeO/kiNJo= =sG+M -----END PGP SIGNATURE----- --J9YdZykiGPT3Jhx7--