From owner-freebsd-wireless@FreeBSD.ORG Mon Mar 16 07:04:50 2015 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D69FB268; Mon, 16 Mar 2015 07:04:50 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id B5BDDCFB; Mon, 16 Mar 2015 07:04:50 +0000 (UTC) Received: from [10.0.1.108] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id C9B67341F877; Mon, 16 Mar 2015 00:04:48 -0700 (PDT) Subject: Re: svn commit: r280120 - head/sys/dev/wpi Mime-Version: 1.0 (Apple Message framework v1283) From: Alfred Perlstein In-Reply-To: Date: Mon, 16 Mar 2015 00:08:59 -0700 Message-Id: <148C400A-4E75-48ED-9135-70C3E07E0E1D@mu.org> References: <201503152132.t2FLWBaw095774@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1283) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 07:04:51 -0000 Just use github, you can then just follow my directions on the = https://wiki.freebsd.org/GitWorkflow page. you can commit them as individual commits if you would like or make a = giant squash commit. Better would really be to replay all the commits into an svn branch, = then make a single svn merge commit. Although svn is meh. -Alfred On Mar 15, 2015, at 2:35 PM, Adrian Chadd wrote: > .. promise I'm done for now. >=20 > (God, it'd be nice to use git, or some web ui that lets me batch > review and commit things like this.) >=20 >=20 > -a >=20 >=20 > On 15 March 2015 at 14:32, Adrian Chadd wrote: >> Author: adrian >> Date: Sun Mar 15 21:32:11 2015 >> New Revision: 280120 >> URL: https://svnweb.freebsd.org/changeset/base/280120 >>=20 >> Log: >> Add a new taskqueue (device specific, not net80211 ic->tq); use it = for >> device restart. >>=20 >> (Committers note - once scan overhaul and a few other things have = been >> fixed in net80211 to not block things in the taskqueue, this can = disappear >> and the device specific taskqueues in other drivers can also go = away.) >>=20 >> PR: kern/197143 >> Submitted by: Andriy Voskoboinyk >>=20 >> Modified: >> head/sys/dev/wpi/if_wpi.c >> head/sys/dev/wpi/if_wpivar.h >>=20 >> Modified: head/sys/dev/wpi/if_wpi.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:30:20 2015 = (r280119) >> +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:32:11 2015 = (r280120) >> @@ -532,6 +532,14 @@ wpi_attach(device_t dev) >> TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); >> TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); >>=20 >> + sc->sc_tq =3D taskqueue_create("wpi_taskq", M_WAITOK, >> + taskqueue_thread_enqueue, &sc->sc_tq); >> + error =3D taskqueue_start_threads(&sc->sc_tq, 1, 0, = "wpi_taskq"); >> + if (error !=3D 0) { >> + device_printf(dev, "can't start threads, error %d\n", = error); >> + goto fail; >> + } >> + >> wpi_sysctlattach(sc); >>=20 >> /* >> @@ -688,6 +696,9 @@ wpi_detach(device_t dev) >>=20 >> wpi_stop(sc); >>=20 >> + taskqueue_drain_all(sc->sc_tq); >> + taskqueue_free(sc->sc_tq); >> + >> callout_drain(&sc->watchdog_rfkill); >> callout_drain(&sc->tx_timeout); >> callout_drain(&sc->scan_timeout); >> @@ -2387,8 +2398,6 @@ wpi_intr(void *arg) >> WPI_WRITE(sc, WPI_FH_INT, r2); >>=20 >> if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) { >> - struct ieee80211com *ic =3D ifp->if_l2com; >> - >> device_printf(sc->sc_dev, "fatal firmware error\n"); >> #ifdef WPI_DEBUG >> wpi_debug_registers(sc); >> @@ -2397,7 +2406,7 @@ wpi_intr(void *arg) >> DPRINTF(sc, WPI_DEBUG_HW, >> "(%s)\n", (r1 & WPI_INT_SW_ERR) ? "(Software = Error)" : >> "(Hardware Error)"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> goto end; >> } >>=20 >> @@ -2950,10 +2959,9 @@ wpi_scan_timeout(void *arg) >> { >> struct wpi_softc *sc =3D arg; >> struct ifnet *ifp =3D sc->sc_ifp; >> - struct ieee80211com *ic =3D ifp->if_l2com; >>=20 >> if_printf(ifp, "scan timeout\n"); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >>=20 >> static void >> @@ -2961,11 +2969,10 @@ wpi_tx_timeout(void *arg) >> { >> struct wpi_softc *sc =3D arg; >> struct ifnet *ifp =3D sc->sc_ifp; >> - struct ieee80211com *ic =3D ifp->if_l2com; >>=20 >> if_printf(ifp, "device timeout\n"); >> if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); >> - ieee80211_runtask(ic, &sc->sc_reinittask); >> + taskqueue_enqueue(sc->sc_tq, &sc->sc_reinittask); >> } >>=20 >> static int >>=20 >> Modified: head/sys/dev/wpi/if_wpivar.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:30:20 2015 = (r280119) >> +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 21:32:11 2015 = (r280120) >> @@ -228,6 +228,9 @@ struct wpi_softc { >> struct task sc_radioon_task; >> struct task sc_start_task; >>=20 >> + /* Taskqueue */ >> + struct taskqueue *sc_tq; >> + >> /* Eeprom info. */ >> uint8_t cap; >> uint16_t rev; >>=20 >=20