*BSD News Article 39699


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!agate!darkstar.UCSC.EDU!news.hal.COM!decwrl!netcomsv!netcom.com!rcarter
From: rcarter@netcom.com (Russell Carter)
Subject: Re: FreeBSD 2.0 3c509 and TPE
Message-ID: <rcarterD0xBJE.33r@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <rcarterD0wytu.A5x@netcom.com>
Date: Fri, 16 Dec 1994 21:54:50 GMT
Lines: 53

Well, I just sat down and hacked it, and not very prettily, either.
The following gets me UTP with a 3c509 combo on my P5-90, and nothing
else.

Cheers,
Russell

This is a patch for FreeBSD 2.0 Release if_ep.c:

--- if_ep.c.orig	Fri Dec 16 13:36:22 1994
+++ if_ep.c	Fri Dec 16 13:36:15 1994
@@ -676,23 +676,24 @@
 	 * 		seems you have to be careful to not plug things
 	 *		into both AUI & UTP.
 	 */
-#if defined(__NetBSD__)
-    if (!(ifp->if_flags & IFF_LINK0) && (sc->ep_connectors & BNC)) {
-#else
-    if (!(ifp->if_flags & IFF_ALTPHYS) && (sc->ep_connectors & BNC)) {
-#endif
-	outw(BASE + EP_COMMAND, START_TRANSCEIVER);
-	DELAY(1000);
-    }
-#if defined(__NetBSD__)
-    if ((ifp->if_flags & IFF_LINK0) && (sc->ep_connectors & UTP)) {
-#else
-    if ((ifp->if_flags & IFF_ALTPHYS) && (sc->ep_connectors & UTP)) {
-#endif
-	GO_WINDOW(4);
-	outw(BASE + EP_W4_MEDIA_TYPE, ENABLE_UTP);
-	GO_WINDOW(1);
-    }
+
+/* 
+ * This next stuff gets you UTP with a 3c509 combo, and works
+ * on my P5-90.  I don't have the time to figure out why the switching
+ * doesn't work.  Sorry.  Russell L. Carter, 12/16/94.  Don't use
+ * link0 link1.
+ */
+    GO_WINDOW(4);
+    outw(BASE + EP_W4_MEDIA_TYPE, DISABLE_UTP);
+    DELAY(1000);
+    GO_WINDOW(1);
+    outw(BASE + EP_COMMAND, STOP_TRANSCEIVER);
+    DELAY(1000);
+    GO_WINDOW(4);
+    outw(BASE + EP_W4_MEDIA_TYPE, ENABLE_UTP);
+    DELAY(1000);
+    GO_WINDOW(1);
+
     outw(BASE + EP_COMMAND, RX_ENABLE);
     outw(BASE + EP_COMMAND, TX_ENABLE);