summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-04-17 05:48:35 +0000
committerimp <imp@FreeBSD.org>2007-04-17 05:48:35 +0000
commit5e201c93e8ef6977dfe347629109a48522c9ba42 (patch)
tree9354a7ce5eec8be9fbc811b492b5fa2f7e828dad /sys/dev
parent3850395c6d4b1b56e34c433ac3072913231f12f8 (diff)
downloadFreeBSD-src-5e201c93e8ef6977dfe347629109a48522c9ba42.zip
FreeBSD-src-5e201c93e8ef6977dfe347629109a48522c9ba42.tar.gz
Don't use spinlocks here. The iicbus transactions can take a long
time, and this prevents interrupts (say for Hz/hardclock) from happening. Time stands still during the transfers...
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iicbus/icee.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/iicbus/icee.c b/sys/dev/iicbus/icee.c
index 6d9d40d..03de150 100644
--- a/sys/dev/iicbus/icee.c
+++ b/sys/dev/iicbus/icee.c
@@ -59,10 +59,10 @@ struct icee_softc {
int wr_sz; /* What's the write page size */
};
-#define ICEE_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx)
-#define ICEE_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx)
+#define ICEE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
+#define ICEE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
#define ICEE_LOCK_INIT(_sc) \
- mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), "icee", MTX_SPIN)
+ mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), "icee", MTX_DEF)
#define ICEE_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx);
#define ICEE_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED);
#define ICEE_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
OpenPOWER on IntegriCloud