From owner-freebsd-bugs Wed Jun 24 03:40:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA29247 for freebsd-bugs-outgoing; Wed, 24 Jun 1998 03:40:46 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA29142 for ; Wed, 24 Jun 1998 03:40:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id DAA08261; Wed, 24 Jun 1998 03:40:01 -0700 (PDT) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA28903; Wed, 24 Jun 1998 03:38:53 -0700 (PDT) (envelope-from nobody) Message-Id: <199806241038.DAA28903@hub.freebsd.org> Date: Wed, 24 Jun 1998 03:38:53 -0700 (PDT) From: max@cca.usart.ru To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: kern/7044: WaveLAN (2.4G, ISA, full-length board) cames UP but not RUNNING Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7044 >Category: kern >Synopsis: WaveLAN (2.4G, ISA, full-length board) cames UP but not RUNNING >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 24 03:40:01 PDT 1998 >Last-Modified: >Originator: Max Gotlib >Organization: Urals State Academy Of Railway Transport >Release: 2.2.5-3.0 >Environment: FreeBSD stoodg.cca.usart.ru 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Mon Oct 27 19:19:56 ES 1997 root@stoodg.cca.usart.ru:/usr/src/sys/compile/STOODG i386 >Description: With full-length, 2.4G, ISA WaveLAN (Lucent Tech.) board, the wl0 interface cames UP but not RUNNING during ifconfig. With WLDEBUG turned on, the following diagnostics appears: wl0: entered wlioctl() wl0: entered wlinit() wl0: enterd wlhwrst() <- the trouble begins here wl0: DCE_STATUS: 0x0, Correct NWID's: 0, Wrong NWID's: 0 THR_PRESET: 0xc0, SIGNAL_LVL: 64, SILENCE_LVL: 64 SIGNQUAL: 0x75, NETW_ID: fe:0, DES: 254 <- it's not mine NETWID, nor mine counterpart's, more - there are no DES encription chips installed !!! wl0: doing wlack() wl0: entered wldiag() wl0: wldiag() failed: status=0; inw=0; outw=e0a0 scb_status 8200 scb_command 0 scb_cbl 1608 cu_cmd 8007 <- THE FINAL BOOH ! wl0: wlintr() called Without WLDEBUG turned on, only wl0: init(): trouble resetting board appears. >How-To-Repeat: cd /sys/i386/conf cp LINT WL; vi WL; config WL cd ../../compile/WL make depend; make; make install shutdown -r now turn the power off; inslatt the WaveLAN board; turn power on ifconfig wl0 inet XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX :) >Fix: In the /sys/i386/include/if_wl_wavelan.h (sibce NtwID is 2-byte value): - #define WLPSA_NWIDENABLE 0x24 - #define WLPSA_SECURITY 0x25 - #define WLPSA_DESKEY 0x26 + #define WLPSA_NWIDENABLE 0x25 + #define WLPSA_SECURITY 0x26 + #define WLPSA_DESKEY 0x27 In file /sys/i386/isa/if_wl.c: in function "int wlhwrst(int unit)" just at the beginning : /* clear reset command and set PIO#1 in autoincrement mode */ sc->hacr = HACR_DEFAULT; CMD(unit); + wlinitmmc(unit); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) wlmmcstat(unit); /* Display MMC registers */ #endif WLDEBUG and in function "static int wlconfig(int unit)" just before the return: if(wlcmd(unit, "config()-address") == 0) return(0); - wlinitmmc(unit); return(1); } So the jist is: during the attachment of the isa device procedure the MMC unit is initialized (OK), then, during initialization of the wl0 inteface (wlinit()) the full hardware reset is performed and the first unit to be reinitialize is command unit, that (at least in my board) refuses this attempt until MMC is initialized. Fix was founded via "instruction by instruction" comparasion of the command flow in FreeBSD and Linux WaveLAN drivers ... >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message