Date: Sun, 10 Jun 2007 06:08:38 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 121328 for review Message-ID: <200706100608.l5A68cdO011334@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=121328 Change 121328 by thompsa@thompsa_heff on 2007/06/10 06:08:03 Use a seperate taskqueue+thread for reset tasks since iwi_ops will block. This could be tuned at a later date. Discussed with: sam Affected files ... .. //depot/projects/wifi/sys/dev/iwi/if_iwi.c#49 edit .. //depot/projects/wifi/sys/dev/iwi/if_iwivar.h#22 edit Differences ... ==== //depot/projects/wifi/sys/dev/iwi/if_iwi.c#49 (text+ko) ==== @@ -271,11 +271,19 @@ taskqueue_thread_enqueue, &sc->sc_tq); taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); + sc->sc_tq2 = taskqueue_create("iwi_taskq2", M_NOWAIT | M_ZERO, + taskqueue_thread_enqueue, &sc->sc_tq2); + taskqueue_start_threads(&sc->sc_tq2, 1, PI_NET, "%s taskq2", + device_get_nameunit(dev)); #else sc->sc_tq = taskqueue_create("iwi_taskq", M_NOWAIT | M_ZERO, taskqueue_thread_enqueue, &sc->sc_tq, &sc->sc_tqproc); kthread_create(taskqueue_thread_loop, &sc->sc_tq, &sc->sc_tqproc, 0, 0, "%s taskq", device_get_nameunit(dev)); + sc->sc_tq2 = taskqueue_create("iwi_taskq2", M_NOWAIT | M_ZERO, + taskqueue_thread_enqueue, &sc->sc_tq2, &sc->sc_tqproc); + kthread_create(taskqueue_thread_loop, &sc->sc_tq2, &sc->sc_tqproc, + 0, 0, "%s taskq2", device_get_nameunit(dev)); #endif TASK_INIT(&sc->sc_radiontask, 0, iwi_radio_on, sc); TASK_INIT(&sc->sc_radiofftask, 0, iwi_radio_off, sc); @@ -485,6 +493,7 @@ if_free(ifp); taskqueue_free(sc->sc_tq); + taskqueue_free(sc->sc_tq2); if (sc->sc_unr != NULL) delete_unrhdr(sc->sc_unr); @@ -1624,7 +1633,7 @@ device_printf(sc->sc_dev, "firmware error\n"); /* don't restart if the interface isn't up */ if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) - taskqueue_enqueue(sc->sc_tq, &sc->sc_restarttask); + taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); sc->flags &= ~IWI_FLAG_BUSY; sc->sc_busy_timer = 0; @@ -1986,7 +1995,7 @@ if (--sc->sc_tx_timer == 0) { if_printf(ifp, "device timeout\n"); ifp->if_oerrors++; - taskqueue_enqueue(sc->sc_tq, &sc->sc_restarttask); + taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); } } if (sc->sc_rfkill_timer > 0) { @@ -2006,7 +2015,7 @@ if (--sc->sc_state_timer == 0) { if_printf(ifp, "firmware stuck in state %d, resetting\n", sc->fw_state); - taskqueue_enqueue(sc->sc_tq, &sc->sc_restarttask); + taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); if (sc->fw_state == IWI_FW_SCANNING) ieee80211_cancel_scan(&sc->sc_ic); sc->sc_state_timer = 3; @@ -2015,7 +2024,7 @@ if (sc->sc_busy_timer > 0) { if (--sc->sc_busy_timer == 0) { if_printf(ifp, "firmware command timeout, resetting\n"); - taskqueue_enqueue(sc->sc_tq, &sc->sc_restarttask); + taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); } } @@ -3676,7 +3685,7 @@ struct ifnet *ifp = ic->ic_ifp; struct iwi_softc *sc = ifp->if_softc; - taskqueue_enqueue(sc->sc_tq, &sc->sc_scanaborttask); + taskqueue_enqueue(sc->sc_tq2, &sc->sc_scanaborttask); } static void ==== //depot/projects/wifi/sys/dev/iwi/if_iwivar.h#22 (text+ko) ==== @@ -128,6 +128,7 @@ uint8_t sc_mcast[IEEE80211_ADDR_LEN]; struct unrhdr *sc_unr; struct taskqueue *sc_tq; /* private task queue */ + struct taskqueue *sc_tq2; /* reset task queue */ #if __FreeBSD_version < 700000 struct proc *sc_tqproc; #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706100608.l5A68cdO011334>