[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ossig] FreeBSD patch for /usr/src/sys/dev/usb/if_aue.c to support eBuilding'sHomePNA service




people,

as a backgrounder, i am trying to use eBuilding's 1Mbps HomePNA service.
ebuildings however gives you this USB dongle, the ADMtek AMD8511 where the
incoming RJ11 phone line connects to. (eBuilding uses the standard
two-wire phone cabling from the MDF room to customer premise). FreeBSD
supports ethernet mode (and the RJ45 port) on the ADMtek AMD8511 thru the
aue(4) driver, but does not support HomePNA (and the RJ11 port).

with this mode, i was forced to use windoze if i wanted to utilize the
eBuildings link. this would not do, so after 36 hours of reading the
ADM8511 design specifications, and poring thru the Linux Pegasus driver
code, i've managed to get aue(4) to go into HomePNA mode. the aue(4)
driver needed to set a couple of GPIO registers and toggle a bit in
another register for this to happen.

the following patch to /usr/src/sys/dev/usb/if_aue.c will enable HomePNA
on this driver, allowing those with freebsd desktops at home to utilize
their service.

here's the patch to the aue(4) device driver which makes it work with the
eBuilding USB/Ethernet dongle. this works, but won't be the official patch
i will be releasing. need to clean up some of the hex constants, and a
couple of if..thens to handle HomePNA enabling/disabling.

installation:

1. cd to /usr/src/sys/dev/usb
2. patch < patchfile
3. rebuild and reinstall kernel
4. reboot
5. ifconfig aue0 ip-address netmask 0xffff0000 media homepna
6. set default route

and you're all set.

patch follows:

------- 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) {
The following attachment was sent,
but NOT saved in the Fcc copy:
    A Text/PLAIN segment of about 536 bytes.