From owner-freebsd-ppc@FreeBSD.ORG Wed Apr 2 16:36:50 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C7B0106564A for ; Wed, 2 Apr 2008 16:36:50 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.69]) by mx1.freebsd.org (Postfix) with ESMTP id 82D458FC2B for ; Wed, 2 Apr 2008 16:36:50 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp001-s [10.150.69.64]) by smtpoutm.mac.com (Xserve/smtpout006/MantshX 4.0) with ESMTP id m32GaoLG003466; Wed, 2 Apr 2008 09:36:50 -0700 (PDT) Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp001/MantshX 4.0) with ESMTP id m32GalUA014588 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 2 Apr 2008 09:36:48 -0700 (PDT) Message-Id: From: Marcel Moolenaar To: Nathan Whitehorn In-Reply-To: <47F39EF4.8040800@uchicago.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Wed, 2 Apr 2008 09:36:46 -0700 References: <47E06B23.7060400@uchicago.edu> <20080325023040.ab0daa19.stas@FreeBSD.org> <47E8527B.2050002@uchicago.edu> <47F39EF4.8040800@uchicago.edu> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-ppc@freebsd.org Subject: Re: BMAC Ethernet Driver X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2008 16:36:50 -0000 On Apr 2, 2008, at 7:57 AM, Nathan Whitehorn wrote: > I've refreshed the BMAC tarball at http://home.physics.wisc.edu/~nwhitehorn/bm.tgz > . > > It supports multicast and full-duplex operation now, the code is a > little more style(9) compliant, and I don't think I have anything > left to do unless someone finds some bugs. The patch to macio is > also now included in the tarball. > > To support full-duplex operation, I had to do a hack to reset > autonegotiation on the PHY (firmware puts the PHY in a weird state > where its registers claim it did autonegotiation, but it always ends > up in half-duplex mode). This is done in this way: > > sc->sc_mii = device_get_softc(sc->sc_miibus); > LIST_FOREACH(child, &sc->sc_mii->mii_phys, mii_list) { > mii_phy_auto(child); > } > > Is a better course to modify lxtphy's attach routine to do this > there? Or should this stay in bm? I lean towards putting it in the PHY driver itself. I expect a PHY reset to do the right thing and in this case it doesn't seem to do that. From what you say it seems that the driver is commitable at this time. I can't test it, but I can definitely commit. Just let me know... -- Marcel Moolenaar xcllnt@mac.com