From owner-p4-projects@FreeBSD.ORG Tue Dec 19 07:40:57 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2E95316A415; Tue, 19 Dec 2006 07:40:57 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E635516A412 for ; Tue, 19 Dec 2006 07:40:56 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5A4343CA3 for ; Tue, 19 Dec 2006 07:40:56 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kBJ7eoix055573 for ; Tue, 19 Dec 2006 07:40:50 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kBJ7en3H055569 for perforce@freebsd.org; Tue, 19 Dec 2006 07:40:49 GMT (envelope-from imp@freebsd.org) Date: Tue, 19 Dec 2006 07:40:49 GMT Message-Id: <200612190740.kBJ7en3H055569@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 111927 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 07:40:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=111927 Change 111927 by imp@imp_lighthouse on 2006/12/19 07:39:51 Unwisely touch this file: add debugging code to gather more data on a condition I see far too often. I fear I'll have to implement COR reset to properly fix this. Basically, the firmware goes out to lunch, we set 'gone' but then bad things happen from there... Affected files ... .. //depot/projects/arm/src/sys/dev/wi/if_wi.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/dev/wi/if_wi.c#10 (text+ko) ==== @@ -850,6 +850,7 @@ { struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; + int error; WI_LOCK(sc); @@ -858,7 +859,10 @@ ieee80211_new_state(ic, IEEE80211_S_INIT, -1); if (sc->sc_enabled && !sc->wi_gone) { CSR_WRITE_2(sc, WI_INT_EN, 0); - wi_cmd(sc, WI_CMD_DISABLE | sc->sc_portnum, 0, 0, 0); + error = wi_cmd(sc, WI_CMD_DISABLE | sc->sc_portnum, 0, 0, 0); + if (error) + printf("wi_stop's DISABLE returned %d disable %d\n", + error, disable); if (disable) { #ifdef __NetBSD__ if (sc->sc_disable)