From owner-freebsd-hardware Mon Nov 30 05:25:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA25414 for freebsd-hardware-outgoing; Mon, 30 Nov 1998 05:25:40 -0800 (PST) (envelope-from owner-freebsd-hardware@FreeBSD.ORG) Received: from dingo.cdrom.com (ppp7.portal.net.au [202.12.71.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA25405 for ; Mon, 30 Nov 1998 05:25:27 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id CAA01242; Sun, 29 Nov 1998 02:37:47 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199811291037.CAA01242@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Randy Bush cc: freebsd-hardware@FreeBSD.ORG Subject: Re: WaveLAN ISA clues needed In-reply-to: Your message of "Tue, 27 Oct 1998 15:30:44 PST." Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-569553260" Date: Sun, 29 Nov 1998 02:37:47 -0800 From: Mike Smith Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multipart MIME message. --==_Exmh_-569553260 Content-Type: text/plain; charset=us-ascii Sorry for the delay on this; you might want to try the attached patches and let me know how you go. > i have an ISA 915mhz roamabout. [ i have been using pcmcia roamabouts for a > few years, even one on an isa pcmcia adapter under bsdi ] > > dmesg sez: > > wl0 at 0x300-0x30f irq 10 on isa > wlattach: base 300, unit 0 > wl0: address 08:00:6a:2b:dd:a7, NWID 0xaaaa > > as you can seem i had already done > > wlconfig wl0 nwid 0xaaaa > > i ifconfig it > > # ifconfig wl0 inet 147.28.2.42 netmask 255.255.255.0 up > Oct 27 15:20:25 rip /kernel: wl0: entered wlioctl() > Oct 27 15:20:26 rip /kernel: wl0: DCE_STATUS: 0x0, Correct NWID's: 65535, Wrong NWID's: 2 > Oct 27 15:20:26 rip /kernel: THR_PRE_SET: 0x44, SIGNAL_LVL: 205, SILENCE_LVL: 192 > Oct 27 15:20:26 rip /kernel: SIGN_QUAL: 0x7f, NETW_ID: ff:aa, DES: 255 > Oct 27 15:20:26 rip /kernel: wl0: entered wlioctl() > Oct 27 15:20:26 rip /kernel: wl0: entered wlinit() > Oct 27 15:20:26 rip /kernel: wl0: entered wlhwrst() > Oct 27 15:20:26 rip /kernel: wl0: DCE_STATUS: 0x0, Correct NWID's: 0, Wrong NWID's: 0 > Oct 27 15:20:26 rip /kernel: THR_PRE_SET: 0xc0, SIGNAL_LVL: 76, SILENCE_LVL: 64 > Oct 27 15:20:26 rip /kernel: SIGN_QUAL: 0x7f, NETW_ID: ff:0, DES: 255 > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: entered wldiag() > Oct 27 15:20:26 rip /kernel: wl0: entered wlconfig() > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: entered wlrustrt() > Oct 27 15:20:26 rip /kernel: wl0: entered wlstart() > Oct 27 15:20:26 rip /kernel: wl0: entered wlstart() > Oct 27 15:20:26 rip /kernel: wl0: entered wlxmt() > Oct 27 15:20:26 rip /kernel: wl0: wavelan device timeout on xmit > Oct 27 15:20:26 rip /kernel: wl0: entered wlinit() > Oct 27 15:20:26 rip /kernel: wl0: entered wlhwrst() > Oct 27 15:20:26 rip /kernel: wl0: DCE_STATUS: 0x0, Correct NWID's: 0, Wrong NWID's: 0 > Oct 27 15:20:26 rip /kernel: THR_PRE_SET: 0xc0, SIGNAL_LVL: 76, SILENCE_LVL: 64 > Oct 27 15:20:26 rip /kernel: SIGN_QUAL: 0x7f, NETW_ID: ff:0, DES: 255 > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: entered wldiag() > Oct 27 15:20:26 rip /kernel: wl0: entered wlconfig() > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: doing a wlack() > Oct 27 15:20:26 rip /kernel: wl0: entered wlrustrt() > Oct 27 15:20:26 rip /kernel: wl0: entered wlstart() > > and another host which has a known-to-be-working 915 at 147.28.2.2 with nwid > 0xaaaa can not see the isa card wavelan. > > 3.0 of a few days ago on asus p350. > > any hints appreciated. the wl and wlconfig man pages are a bit weak. > > randy > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hardware" in the body of the message > --==_Exmh_-569553260 Content-Type: message/rfc822 ; name="205" Content-Description: 205 Content-Disposition: attachment; filename="205" Return-Path: mike Received: from cain.gsoft.com.au for mike with Cubic Circle's cucipop (v1.14 1997/04/11) Sun Jul 26 03:35:07 1998 X-From_: jflowers@ezo.net Sun Jul 26 03:34:26 1998 Received: from lily.ezo.net (root@lily.ezo.net [206.102.130.13]) by cain.gsoft.com.au (8.8.8/8.6.9) with ESMTP id DAA05391 for ; Sun, 26 Jul 1998 03:34:21 +0930 (CST) Received: from violet.eznets.canton.oh.us (p140.ezo.net [206.102.130.72]) by lily.ezo.net (8.8.7/8.8.7) with SMTP id OAA06143 for >; Sat, 25 Jul 1998 14:02:25 -0400 (EDT) From: "Jim Flowers" To: " Subject: Re: WaveLAN Driver for FreeBSD/Attachments Date: Sat, 25 Jul 1998 14:05:02 -0400 Message-ID: <01bdb7f6$bec289a0$8a8266ce@violet.eznets.canton.oh.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0093_01BDB7D5.37B0E9A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 This is a multi-part message in MIME format. ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit And with the attachments: Jim Flowers >Mike, > >Many hours later, the details of which are boring, I managed to get this >running with a couple of minor hacks to if_wl.c and if_wl.h. The >WaveLAN/ISA card now runs well (900 Kbps with 500 byte packets >point-to-point) and reliably (starts up every time) on four different >machines (486, P133, P200 and Cyrix Gx86). The 486 and Gx86 run OK with >unmodified code. > >The first is a SLOW_CMD that inserts a 20 mS delay via DELAY() in wlhwrst() >when issuing the clear reset and set PIO#1 in autoincrement mode command. >Apparently the next call to wlmmcstat() or wlbldcu() interferes with >completion of the hardware reset. The P133 worked OK with 10 mS but the >P200 needed more. Issuing 2 regular (1 mS) CMDs also provided the same >effect. DELAY(15000000) does check in at 15 mS. While this allows the >initial routines to complete without error and marks wl0 up and running it >does not actually transmit/receive packets until a wlconfig wl0 currnwid >0x#### command is issued. > >So the second hack was to perform the same MMC_WRITE(MMC_NETW_ID_?) commands >just before leaving wlhwrst(). Other MMC_WRITE commands (I only tried >MMC_FREEZE) don't do it. Don't know why but this starts the mmc running and >everything works OK. > >Thought this information might be useful to you or anyone else having >problems or in updating the driver code. A copy of the universal diffs and >the dmesg from each machine is attached. > >Now, if I can just get the lnc Ethernet driver to work with the built in >Am79C971 chip on the unit with the Gx86 processor I'll be happy. Next >project (shudder :-( Any other ideas here? > >Regards, > >Jim > >> >>The ISA Wavelans are *extremely* touchy about timing. You might want >>to start by checking the ISA config on your new board, and perhaps >>crank out some of the I/O delays, etc. >> >>> wl0: bldcu() not ready after reset >>> wl0: diag() failed; status=0,inw=0,outw=e0a0 >>> scb_status 0 >>> scb_command 100 >>> scb_cbl adaa >>> cu_cmd 8007 >>> wl0: init(): trouble resetting board >> >>You could also try upping STATUS_TRIES in sys/i386/isa/if_wl.c. There >>are quite a few hardcoded spin loops in this driver; the diag() failure >>may be symptomatic of this too. >> >>What motherboard chipset(s) are you using? >> >>> Pings to the ifconfigged address work; beyond that, no response. Not >>> surprising as it's marked up but not running. Same problem on a Pentium >>> 200MMX. >> >>Um, actually if it's responding to pings, then it's more or less >>working. >> >>> Any suggestions on where to start looking? I know the driver is well >>> documented so that's where I'll be but I'm hoping this is something >obvious >>> as I would like to use a lot of these boxes for a wireless network. >> >>Try increasing the STATUS_TRIES value to start with, and see if that >>makes the 'not ready after reset' message go away. If that works, then >>increase the value in the poll loop above the 'failed; status' message. >> >>It may be that when the first is fixed, the card will be happy enough >>that the rest work. Apart from that, it actually appears to be running >>well enough - the interrupt handler is being called, and it's sending >>stuff in response OK, it's just not passing the startup tests. > > ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="if_wl.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="if_wl.c.patch" --- if_wl.c.dist Tue Jul 21 00:39:23 1998 +++ if_wl.c Fri Jul 24 09:10:09 1998 @@ -653,6 +653,9 @@ + (wlmmcread(base,MMC_EEDATAHrv)<<8); /* 2.4 Gz */ sp->freq24 = (i>>6)+2400; /* 2.4 Gz: save real freq */ } + MMC_WRITE(MMC_NETW_ID_L,sp->nwid[1]); /* these are needed to */ + MMC_WRITE(MMC_NETW_ID_H,sp->nwid[0]); /* get the mmc to run, */ + /* not a clue as to why. */ } /* @@ -731,7 +734,8 @@ /* clear reset command and set PIO#1 in autoincrement mode */ sc->hacr = HACR_DEFAULT; - CMD(unit); + SLOW_CMD(unit); /* allows wlhwrst and calls to complete. wl0 is + marked up and running but mmc is not running. */ #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="if_wl.h.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="if_wl.h.patch" --- if_wl.h.dist Sat Jul 18 15:00:19 1998 +++ if_wl.h Fri Jul 24 08:46:34 1998 @@ -102,6 +102,13 @@ DELAY(DELAYCONST); \ } +#define SLOW_CMD(unit) \ + { \ + outw(HACR(WLSOFTC(unit)->base),WLSOFTC(unit)->hacr); \ + /* delay for 20 ms, when much longer is needed */ \ + DELAY(20000); \ + } + /* macro for setting the channel attention bit. No delays here since * it is used in critical sections */ ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="dmesg.486" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dmesg.486" FreeBSD 2.2.6-RELEASE #0: Fri Jul 17 10:50:31 EDT 1998 jflowers@tiny.ezo.net:/usr/src/sys/compile/SkyLAN Calibrating clock(s) ... i8254 clock: 1193278 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency CPU: i486 DX2 (486-class CPU) Origin = "GenuineIntel" Id = 0x435 Stepping=5 Features=0x3 real memory = 8388608 (8192K bytes) Physical memory chunk(s): 0x00001000 - 0x0009ffff, 651264 bytes (159 pages) 0x00273000 - 0x007fdfff, 5812224 bytes (1419 pages) avail memory = 6184960 (6040K bytes) pcibus_setup(1): mode 1 addr port (0x0cf8) is 0xffffff18 pcibus_setup(2): mode 2 enable port (0x0cf8) is 0xff Probing for devices on the ISA bus: wl0: address 08:00:6a:2a:24:aa, NWID 0x0123, Freq 2422 MHz hasr 0008 scb at ffde: 0040 0000 e0a0 0000 0000 0000 0000 0000 cu at e0a0: a400 a004 ffff e1a0 0008 2b6a 80d0 0008 tbd at e1a0: 8054 ffff e3e0 0000 wl0: entered wlioctl() wl0: entered wlinit() wl0: entered wlhwrst() wl0: DCE_STATUS: 0x0, Correct NWID's: 0, Wrong NWID's: 0 THR_PRE_SET: 0xc0, SIGNAL_LVL: 104, SILENCE_LVL: 67 SIGN_QUAL: 0xff, NETW_ID: ff:0, DES: 255 wl0: doing a wlack() wl0: entered wldiag() wl0: doing a wlack() wl0: entered wlconfig() wl0: doing a wlack() wl0: entered wlrustrt() wl0: entered wlstart() wl0: entered wlstart() wl0: entered wlxmt() wl0: wlintr() called wl0: doing a wlack() wl0: entered wlstart() wl0: entered wlioctl() ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="dmesg.crocus" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dmesg.crocus" FreeBSD 3.0-971006-SNAP #4: Fri Jul 24 03:07:43 EDT 1998 jflowers@crocus.ezo.net:/usr/src/sys/compile/LOCAL Calibrating clock(s) ... i586 clock: 199337259 Hz, i8254 clock: 1193353 = Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency CLK_USE_I586_CALIBRATION not specified - using old calibration method CPU: Pentium (199.31-MHz 586-class CPU) Origin =3D "GenuineIntel" Id =3D 0x543 Stepping=3D3 Features=3D0x8001bf real memory =3D 33554432 (32768K bytes) Physical memory chunk(s): 0x00001000 - 0x0009ffff, 651264 bytes (159 pages) 0x002a9000 - 0x01ffdfff, 30756864 bytes (7509 pages) avail memory =3D 29945856 (29244K bytes) Found BIOS32 Service Directory header at 0xf00faef0 Entry =3D 0xfb370 (0xf00fb370) Rev =3D 0 Len =3D 1 PCI BIOS entry at 0xb3a0 DMI header at 0xf00f5ca0 Version 2.0 Table at 0xf0800, 21 entries, 694 bytes Other BIOS signatures found: ACPI: 00000000 $PnP: 000fbf20 pci_open(1): mode 1 addr port (0x0cf8) is 0x80000060 pci_open(1a): mode1res=3D0x80000000 (0x80000000) pci_cfgcheck: device 0 [class=3D060000] [hdr=3D00] is there = (id=3D15951106) Probing for devices on PCI bus 0: found-> vendor=3D0x1106, dev=3D0x1595, revid=3D0x06 class=3D06-00-00, hdrtype=3D0x00, mfdev=3D0 chip0: rev 0x06 on = pci0.0.0 found-> vendor=3D0x1106, dev=3D0x0586, revid=3D0x41 class=3D06-01-00, hdrtype=3D0x00, mfdev=3D1 chip1: rev 0x41 on = pci0.7.0 found-> vendor=3D0x1106, dev=3D0x0571, revid=3D0x06 class=3D01-01-8a, hdrtype=3D0x00, mfdev=3D0 ide_pci0: rev 0x06 on = pci0.7.1 via_571_status: Primary IDE prefetch/postwrite enabled/enabled via_571_status: busmaster status read retry enabled via_571_status: primary drive 0 data setup=3D4 active=3D3 recovery=3D1 via_571_status: primary ctrl active=3D16 recovery=3D1 via_571_status: secondary drive 1 udma method=3D0 enable=3D0 PIOmode=3D0 = cycle=3D5 via_571_status: Primary IDE prefetch/postwrite enabled/enabled via_571_status: busmaster status read retry enabled via_571_status: primary drive 1 data setup=3D4 active=3D11 recovery=3D9 via_571_status: primary ctrl active=3D16 recovery=3D1 via_571_status: secondary drive 1 udma method=3D0 enable=3D0 PIOmode=3D0 = cycle=3D5 ide_pci: busmaster 0 status: 04 from port: 00007002 via_571_status: Secondary IDE prefetch/postwrite enabled/disabled via_571_status: busmaster status read retry enabled via_571_status: secondary drive 0 data setup=3D4 active=3D4 recovery=3D2 via_571_status: secondary ctrl active=3D16 recovery=3D9 via_571_status: secondary drive 1 udma method=3D0 enable=3D0 PIOmode=3D0 = cycle=3D5 via_571_status: Secondary IDE prefetch/postwrite enabled/disabled via_571_status: busmaster status read retry enabled via_571_status: secondary drive 1 data setup=3D4 active=3D11 = recovery=3D9 via_571_status: secondary ctrl active=3D16 recovery=3D9 via_571_status: secondary drive 1 udma method=3D0 enable=3D0 PIOmode=3D0 = cycle=3D5 ide_pci: busmaster 1 status: 04 from port: 0000700a found-> vendor=3D0x1106, dev=3D0x3040, revid=3D0x10 class=3D00-00-00, hdrtype=3D0x00, mfdev=3D0 found-> vendor=3D0x10ec, dev=3D0x8029, revid=3D0x00 class=3D02-00-00, hdrtype=3D0x00, mfdev=3D0 intpin=3Da, irq=3D11 map[0]: type 4, range 32, base 00007200, size 5 wl0 at 0x300-0x30f irq 10 on isa bpf: wl0 attached wl0: address 08:00:6a:2b:8f:83, NWID 0x0123, Freq 2422 MHz hasr 0008 scb at ffde: 0040 0000 e0a0 0000 0000 0000 0000 0000=20 cu at e0a0: a400 a004 ffff e1a0 ffff ffff ffff 0008=20 tbd at e1a0: 807c ffff e3e0 0000=20 ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="dmesg.radar" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dmesg.radar" FreeBSD 2.2.6-RELEASE #27: Fri Jul 24 09:10:29 EDT 1998 Calibrating clock(s) ... i586 clock: 199342578 Hz, i8254 clock: 1193384 = Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency CLK_USE_I586_CALIBRATION not specified - using old calibration method CPU: Pentium (199.31-MHz 586-class CPU) Origin =3D "GenuineIntel" Id =3D 0x543 Stepping=3D3 Features=3D0x8001bf real memory =3D 33554432 (32768K bytes) Physical memory chunk(s): 0x00001000 - 0x0009efff, 647168 bytes (158 pages) 0x00272000 - 0x01ffdfff, 30982144 bytes (7564 pages) avail memory =3D 30408704 (29696K bytes) pcibus_setup(1): mode 1 addr port (0x0cf8) is 0x80000060 pcibus_setup(1a): mode1res=3D0x80000000 (0x80000000) pcibus_check: device 0 is there (id=3D15951106) Probing for devices on PCI bus 0: configuration mode 1 allows 32 devices. chip0 = rev 4 on pci0:0:0 chip1 = rev 39 on pci0:7:0 pci0:7:1: VIA Technologies, device=3D0x0571, class=3Dstorage (ide) [no = driver assigned] map(20): io(6000) ed1 rev 0 int a irq 11 on pci0:17:0 mapreg[10] type=3D1 addr=3D00006200 size=3D0020. ed1: address 00:40:ca:10:1e:f7, type NE2000 (16 bit)=20 bpf: ed1 attached vga0 rev 6 int a irq ?? on pci0:18:0 mapreg[10] type=3D0 addr=3De0000000 size=3D4000000. pci0: uses 67108864 bytes of memory from e0000000 upto e3ffffff. pci0: uses 32 bytes of I/O space from 6200 upto 621f. Probing for devices on the ISA bus: wl0 at 0x300-0x30f irq 5 on isa bpf: wl0 attached wl0: address 08:00:6a:2b:d0:80, NWID 0x0123, Freq 2422 MHz hasr 0008 scb at ffde: 0040 0000 e0a0 0000 0000 0000 0000 0000=20 cu at e0a0: a000 8001 e0a0 0008 2b6a 80d0 0100 0008=20 tbd at e1a0: 0000 ffff 0000 0000=20 Device configuration finished. ------=_NextPart_000_0093_01BDB7D5.37B0E9A0 Content-Type: application/octet-stream; name="dmesg.tiny" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dmesg.tiny" FreeBSD 2.2.6-RELEASE #0: Wed Jul 15 07:05:28 EDT 1998 jflowers@tiny.ezo.net:/usr/src/sys/compile/SkyLAN Calibrating clock(s) ... failed, using default i8254 clock of 1193182 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency CPU: Cyrix MediaGX (486-class CPU) Origin =3D "CyrixInstead" DIR=3D0x1045 Stepping=3D1 Revision=3D0 real memory =3D 15204352 (14848K bytes) Physical memory chunk(s): 0x00001000 - 0x0009ffff, 651264 bytes (159 pages) 0x0026e000 - 0x00e7dfff, 12648448 bytes (3088 pages) avail memory =3D 12824576 (12524K bytes) pcibus_setup(1): mode 1 addr port (0x0cf8) is 0x800090d0 pcibus_setup(1a): mode1res=3D0x80000000 (0x80000000) pcibus_check: device 0 is there (id=3D00011078) Probing for devices on PCI bus 0: configuration mode 1 allows 32 devices. chip0 = rev 0 on pci0:0:0 lnc1 rev 37 int a irq 10 on pci0:7:0 mapreg[10] type=3D1 addr=3D00006000 size=3D0020. mapreg[14] type=3D0 addr=3De0000000 size=3D0020. lnc1: NE2100 (C-LANCE) address 00:e0:c5:fc:1a:dc chip1 = rev 0 on pci0:18:0 mapreg[10] type=3D1 addr=3D00003000 size=3D0040. pci0: uses 32 bytes of memory from e0000000 upto e000001f. pci0: uses 96 bytes of I/O space from 3000 upto 601f. Probing for devices on the ISA bus: lnc0: disabled, not probed. wl0 not found at 0x300 Device configuration finished. ------=_NextPart_000_0093_01BDB7D5.37B0E9A0-- --==_Exmh_-569553260 Content-Type: text/plain; charset=us-ascii \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com --==_Exmh_-569553260-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message