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 try to hold the mutex if we are disabling ...
details: https://anonhg.NetBSD.org/src/rev/7bfac50e302f
branches: trunk
changeset: 757431:7bfac50e302f
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 29 07:00:13 2010 +0000
description:
Don't try to hold the mutex if we are disabling the card because we can
be called from an interrupt context. While this is not strictly correct,
we are SoL anyway so this does not matter.
diffstat:
sys/dev/pci/if_iwn.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 402d1289571c -r 7bfac50e302f sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Sat Aug 28 21:30:02 2010 +0000
+++ b/sys/dev/pci/if_iwn.c Sun Aug 29 07:00:13 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwn.c,v 1.49 2010/07/10 04:09:35 christos Exp $ */
+/* $NetBSD: if_iwn.c,v 1.50 2010/08/29 07:00:13 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.49 2010/07/10 04:09:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.50 2010/08/29 07:00:13 christos Exp $");
#define IWN_USE_RBUF /* Use local storage for RX */
#undef IWN_HWCRYPTO /* XXX does not even compile yet */
@@ -5913,7 +5913,8 @@
struct iwn_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
- mutex_enter(&sc->sc_mtx);
+ if (!disable)
+ 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);
@@ -5928,7 +5929,8 @@
sc->sc_sensor.value_cur = 0;
sc->sc_sensor.state = ENVSYS_SINVALID;
#endif
- mutex_exit(&sc->sc_mtx);
+ if (!disable)
+ mutex_exit(&sc->sc_mtx);
}
/*
Home |
Main Index |
Thread Index |
Old Index