From owner-freebsd-bugs Sun Jul 30 22:20:01 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id WAA07130 for bugs-outgoing; Sun, 30 Jul 1995 22:20:01 -0700 Received: from gatekeeper.alpharel.com (gatekeeper.ALPHAREL.COM [204.118.5.2]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id WAA07118 ; Sun, 30 Jul 1995 22:19:59 -0700 Received: (from mail@localhost) by gatekeeper.alpharel.com (8.6.8/8.6.6a) id WAA17136; Sun, 30 Jul 1995 22:15:44 -0700 Received: from optisun40.optigfx.com(147.203.1.40) by gatekeeper.alpharel.com via smap (V1.3) id sma017134; Sun Jul 30 22:15:40 1995 Received: by optisun40.optigfx.COM (4.1/SMI-4.1.SI1) id AA16043; Sun, 30 Jul 95 22:15:38 PDT Date: Sun, 30 Jul 95 22:15:38 PDT From: schwarz@alpharel.com (Steve Schwarz) Message-Id: <9507310515.AA16043@optisun40.optigfx.COM> To: freebsd-bugs@freebsd.org, freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org, hosokawa@mt.cs.keio.ac.jp, jleppek@suw2k.ess.harris.com Subject: 3c589 card CAN be made to work BNC Sender: bugs-owner@freebsd.org Precedence: bulk Ok. It's been a long weekend (note the time) but trial and error is always like that. I >finally< have wrestled my 3c589 into working BNC. I went over to the Linux 3c589_cs.c driver and read it (line by line) against FreeBSD's /usr/src/sys/i386/isa/if_zp.c. In doing so, I discovered some things Linux was doing that FreeBSD was not. This leads to the following patch to FreeBSD's /usr/src/sys/i386/isa/if_zp.c. My original of that source file came from the 2.0.5 cdrom. Here is the single diff-section patch: ######################################################################## *** if_zp.c Mon Jul 31 00:47:22 1995 --- if_zp.c.orig Sun Jul 30 17:42:19 1995 *************** *** 1069,1082 **** if (!(ifp->if_flags & IFF_ALTPHYS) && (sc->ep_connectors & BNC)) { #endif #ifdef ZP_DEBUG ! printf("START TRANSCEIVER"); #endif /* ZP_DEBUG */ - GO_WINDOW(0); - /* Set the xcvr */ - outw(BASE + EP_W0_ADDRESS_CFG, 3 << 14); - GO_WINDOW(2); outw(BASE + EP_COMMAND, START_TRANSCEIVER); - GO_WINDOW(1); DELAY(1000); } #if defined(__NetBSD__) || defined(__FreeBSD__) --- 1069,1077 ---- if (!(ifp->if_flags & IFF_ALTPHYS) && (sc->ep_connectors & BNC)) { #endif #ifdef ZP_DEBUG ! printf("START TRANCEIVER"); #endif /* ZP_DEBUG */ outw(BASE + EP_COMMAND, START_TRANSCEIVER); DELAY(1000); } #if defined(__NetBSD__) || defined(__FreeBSD__) ######################################################################## This patch is not elegant but it is enough to make BNC work without affecting UTP. I confess to being a total novice as far as the procedure for submitting bug fixes. If I have not given enough information for someone to handle getting this fix in, please just let me know. I can't resist quoting the comment from the Linux source file that made me first think I had found the answer: /* This is vital: the transceiver used must be set in the resource configuration register. It took me many hours to discover this. */ I know the feeling. sts