From 1a13e01f7f7c0c6afd5ac74e24d5d36ee603e61b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 17 Apr 2007 05:48:35 +0000 Subject: [PATCH] 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... --- sys/dev/iicbus/icee.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/iicbus/icee.c b/sys/dev/iicbus/icee.c index 6d9d40d615aa..03de150702b5 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);