Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Don't use spinlocks.



details:   https://anonhg.NetBSD.org/src/rev/37984e7411c3
branches:  trunk
changeset: 756030:37984e7411c3
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 03 21:43:37 2010 +0000

description:
Don't use spinlocks.

diffstat:

 sys/dev/pci/if_iwn.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 1281e58d47ea -r 37984e7411c3 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Sat Jul 03 18:59:38 2010 +0000
+++ b/sys/dev/pci/if_iwn.c      Sat Jul 03 21:43:37 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwn.c,v 1.47 2010/07/02 14:47:25 christos Exp $     */
+/*     $NetBSD: if_iwn.c,v 1.48 2010/07/03 21:43:37 christos Exp $     */
 /*     $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $      */
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.47 2010/07/02 14:47:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.48 2010/07/03 21:43:37 christos Exp $");
 
 #define IWN_USE_RBUF   /* Use local storage for RX */
 #undef IWN_HWCRYPTO    /* XXX does not even compile yet */
@@ -5842,7 +5842,7 @@
        struct ieee80211com *ic = &sc->sc_ic;
        int error;
 
-       mutex_spin_enter(&sc->sc_mtx);
+       mutex_enter(&sc->sc_mtx);
        if (sc->sc_flags & IWN_FLAG_HW_INITED)
                return 0;
        if ((error = iwn_hw_prepare(sc)) != 0) {
@@ -5898,10 +5898,10 @@
                ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
 
        sc->sc_flags |= IWN_FLAG_HW_INITED;
-       mutex_spin_exit(&sc->sc_mtx);
+       mutex_exit(&sc->sc_mtx);
        return 0;
 
-fail:  mutex_spin_exit(&sc->sc_mtx);
+fail:  mutex_exit(&sc->sc_mtx);
        iwn_stop(ifp, 1);
        return error;
 }
@@ -5912,7 +5912,7 @@
        struct iwn_softc *sc = ifp->if_softc;
        struct ieee80211com *ic = &sc->sc_ic;
 
-       mutex_spin_enter(&sc->sc_mtx);
+       mutex_enter(&sc->sc_mtx);
        sc->sc_flags &= ~IWN_FLAG_HW_INITED;
        ifp->if_timer = sc->sc_tx_timer = 0;
        ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
@@ -5927,7 +5927,7 @@
        sc->sc_sensor.value_cur = 0;
        sc->sc_sensor.state = ENVSYS_SINVALID;
 #endif
-       mutex_spin_exit(&sc->sc_mtx);
+       mutex_exit(&sc->sc_mtx);
 }
 
 /*



Home | Main Index | Thread Index | Old Index