From owner-freebsd-questions@FreeBSD.ORG Thu Jan 8 04:17:42 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA9BD16A4CE for ; Thu, 8 Jan 2004 04:17:42 -0800 (PST) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 7E33B43D54 for ; Thu, 8 Jan 2004 04:17:37 -0800 (PST) (envelope-from dinesh@alphaque.com) Received: (qmail 69596 invoked by uid 0); 8 Jan 2004 12:10:55 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 8 Jan 2004 12:10:55 -0000 Received: from localhost (localhost.alphaque.com [127.0.0.1]) by prophet.alphaque.com (8.12.10/8.12.9) with ESMTP id i08C9wHi000523; Thu, 8 Jan 2004 20:09:58 +0800 (MYT) (envelope-from dinesh@alphaque.com) Date: Thu, 8 Jan 2004 20:09:58 +0800 (MYT) From: Dinesh Nair To: freebsd-questions@freebsd.org, In-Reply-To: <20040107212459.X330-100000@prophet.alphaque.com> Message-ID: <20040108200607.N384-100000@prophet.alphaque.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: SOLVED: ADMtek USB To LAN Converter and HomePNA X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2004 12:17:42 -0000 people, the following patch solves this problem. according to the ADM8511 datasheet, a couple of registers need to be set with specific values to enable the HomePNA PHY on the device. the current aue(4) driver does not do this, and thus by default the device will only enable the Ethernet PHY. you'd need to rebuild kernel or just kldunload/kldload if using the if_aue.ko module. ------- CUT HERE ------- --- if_aue.c.org Thu Jan 8 19:29:27 2004 +++ if_aue.c Thu Jan 8 19:29:27 2004 @@ -581,7 +581,7 @@ csr_write_1(sc, AUE_REG_81, 6); else #endif - csr_write_1(sc, AUE_REG_81, 2); + csr_write_1(sc, AUE_REG_81, 6); } Static void @@ -610,6 +610,7 @@ */ csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0); csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0|AUE_GPIO_SEL1); + csr_write_1(sc, AUE_GPIO1, 0x34); /* Grrr. LinkSys has to be different from everyone else. */ if (sc->aue_info->aue_flags & LSYS) { -------CUT HERE ------- On Wed, 7 Jan 2004, Dinesh Nair wrote: > hey, > > i have one of the above. it's a usb device which connects to a HomePNA > network, with a 10/100Mbps ethernet port as well as a couple of RJ11s for > the HomePNA connection. > > my problem is i am unable to utilize this device to connect to the HomePNA > network. upon plugging it in, the console says: > > aue0: ADMtek USB To LAN Converter, rev 1.10/1.01, addr 2 > aue0: Ethernet address: 00:08:54:d0:5d:2e > miibus1: on aue0 > pnaphy0: on miibus1 > pnaphy0: HomePNA > > ifconfig aue0 response is: > aue0: flags=8802 mtu 1500 > ether 00:08:54:d0:5d:2e > media: Ethernet homePNA (none) > > i run 'ifconfig aue0 10.1.105.26 netmask 0xffff0000 media homepna' and the > device then gets to the following: > > aue0: flags=8843 mtu 1500 > inet 10.1.105.26 netmask 0xffff0000 broadcast 10.1.255.255 > ether 00:08:54:d0:5d:2e > media: Ethernet homePNA > status: active > > however, i am unable to ping any ip address other than the interface's > address. obviously, no firewalls (ipfw/ipchains/ipf) are being run and > this is on FreeBSD 4.9-STABLE built as of a couple of weeks back. > > i've played around with disabling the ethernet PHY on the device with the > following diff to /usr/src/sys/dev/usb/if_aue.c: > > --- CUT HERE --- > --- if_aue.c.org Wed Jan 7 20:02:51 2004 > +++ if_aue.c Wed Jan 7 21:04:06 2004 > @@ -434,6 +434,28 @@ > #endif > } > > + /* > + * The Am79C978 HomePNA PHY actually contains > + * two transceivers: a 1Mbps HomePNA PHY and a > + * 10Mbps full/half duplex ethernet PHY with > + * NWAY autoneg. However, the HomePNA PHY is > + * not recognized, but the 10/100Mbps PHY is > + * though. This skips over the 10/100Mbps PHY > + * and only activates the 1Mbps HomePNA PHY > + * > + * Modified by Dinesh Nair > + * Wed Jan 7 20:36:34 MYT 2004 > + * > + */ > + if (sc->aue_info->aue_vid == USB_VENDOR_ADMTEK && > + sc->aue_info->aue_did == USB_PRODUCT_ADMTEK_PEGASUSII) { > + if (phy == 1) > + return(0); > + } > + /* > + * End of modifications by Dinesh Nair > + */ > + > csr_write_1(sc, AUE_PHY_ADDR, phy); > csr_write_1(sc, AUE_PHY_CTL, reg|AUE_PHYCTL_READ); > --- CUT HERE --- > > but to no avail. i've discovered that the ethernet PHY is phy==1, while > the two RJ11 PHYs are 2 and 3. > > the ethernet PHY works fine and dandy, and i am able to connect it to my > local switch fine. however, i need to use it for a HomePNA application, > and thus need to HomePNA portion of this to work. > > any ideas from anyone who's tried something like this before with some > measure of success ? any media types or mediaopts i should be passing to > ifconfig ? > > this setup is used by a broadband provider in kuala lumpur, malaysia and > to date this has been the one barrier which prevents freebsd users from > utilizing their service. > > Regards, /\_/\ "All dogs go to heaven." > dinesh@alphaque.com (0 0) http://www.alphaque.com/ > +==========================----oOO--(_)--OOo----==========================+ > | for a in past present future; do | > | for b in clients employers associates relatives neighbours pets; do | > | echo "The opinions here in no way reflect the opinions of my $a $b." | > | done; done | > +=========================================================================+ > > Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+