From owner-freebsd-stable Thu Mar 14 7:50:31 2002 Delivered-To: freebsd-stable@freebsd.org Received: from glass.dnsart.com (ip246-202.dialup11.tokyo.jp.psi.net [154.33.246.202]) by hub.freebsd.org (Postfix) with ESMTP id 8E32D37B402 for ; Thu, 14 Mar 2002 07:50:23 -0800 (PST) Received: from localhost ([127.0.0.1]) by glass.dnsart.com with esmtp (Exim 3.35 #1) id 16lXPO-00007D-00; Fri, 15 Mar 2002 00:44:50 +0900 Date: Fri, 15 Mar 2002 00:44:47 +0900 (JST) From: Tod McQuillin X-X-Sender: devin@glass.pun-pun.prv To: Brooks Davis Cc: Dan Langille , Subject: Re: wi0 problems under latest STABLE In-Reply-To: <20020311105627.A9391@Odin.AC.HMC.Edu> Message-ID: <20020315003925.J437-100000@glass.pun-pun.prv> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 11 Mar 2002, Brooks Davis wrote: > At this point there isn't. I I'm going to have to rethink handling this > problem. It appears that WI_TIMEOUT is actually too long (it hangs the > machine for WI_TIMEOUT*WI_DELAY if the command doesn't return). > Additionaly, it appears that some cards are just broken and we need to > find a way to deal with them. I made some changes to if_wi.c which completely cleared up the "timeout in wi_cmd" messages and 500ms freezes which came up every minute on my laptop and desktop machines. The laptop is now completely back to the same behaviour as in cvs rev 1.18.2.14 and earlier of if_wi.c, though the desktop still logs these messages at boot: wi0: at port 0x240-0x27f irq 15 slot 0 on pccard0 wi0: 802.11 address: 00:02:2d:2b:ab:06 wi0: using Lucent chip or unknown chip wi0: timeout in wi_cmd 2; event status 8080 wi0: timeout in wi_cmd 0; event status 8080 wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: wi_cmd: busy bit won't clear. wi0: init failed Probably some changes are still needed at attach time. Here is the patch: Index: if_wi.c =================================================================== RCS file: /usr/src/cvs-repo/src/sys/i386/isa/Attic/if_wi.c,v retrieving revision 1.18.2.16 diff -c -r1.18.2.16 if_wi.c *** if_wi.c 4 Mar 2002 20:03:57 -0000 1.18.2.16 --- if_wi.c 14 Mar 2002 12:55:54 -0000 *************** *** 453,459 **** --- 453,461 ---- struct wi_ltv_gen gen; struct ifnet *ifp; int error; + int s; + s = splimp(); sc = device_get_softc(dev); ifp = &sc->arpcom.ac_if; *************** *** 463,468 **** --- 465,471 ---- if (error) { device_printf(dev, "bus_setup_intr() failed! (%d)\n", error); wi_free(dev); + splx(s); return (error); } *************** *** 481,486 **** --- 484,490 ---- if ((error = wi_read_record(sc, (struct wi_ltv_gen *)&mac)) != 0) { device_printf(dev, "mac read failed %d\n", error); wi_free(dev); + splx(s); return (error); } bcopy((char *)&mac.wi_mac_addr, *************** *** 584,589 **** --- 588,594 ---- ether_ifattach(ifp, ETHER_BPF_SUPPORTED); callout_handle_init(&sc->wi_stat_ch); + splx(s); return(0); } *************** *** 799,804 **** --- 804,810 ---- { struct wi_softc *sc; struct ifnet *ifp; + int s; sc = xsc; ifp = &sc->arpcom.ac_if; *************** *** 809,815 **** --- 815,823 ---- if (ifp->if_flags & IFF_OACTIVE) return; + s = splimp(); wi_cmd(sc, WI_CMD_INQUIRE, WI_INFO_COUNTERS); + splx(s); return; } -- Tod McQuillin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message