From: François Tigeot Date: Sun, 12 Aug 2012 16:57:10 +0000 (+0200) Subject: ixgbe: replace direct lockmgr calls by macros X-Git-Tag: v3.2.0~410 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/fe6091088cb5a4c06da7b95725adc4cb00cb95e4 ixgbe: replace direct lockmgr calls by macros Only 3 lines didn't use the IXGBE_CORE_LOCK/UNLOCK() abstractions --- diff --git a/sys/dev/netif/ixgbe/ixgbe.c b/sys/dev/netif/ixgbe/ixgbe.c index e351049..8ba4f72 100644 --- a/sys/dev/netif/ixgbe/ixgbe.c +++ b/sys/dev/netif/ixgbe/ixgbe.c @@ -2030,7 +2030,7 @@ ixgbe_local_timer(void *arg) struct tx_ring *txr = adapter->tx_rings; int hung, busy, paused; - lockmgr(&adapter->core_lock, LK_EXCLUSIVE); + IXGBE_CORE_LOCK(adapter); KKASSERT(lockstatus(&adapter->core_lock, curthread) != 0); hung = busy = paused = 0; @@ -2076,7 +2076,7 @@ ixgbe_local_timer(void *arg) out: ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); - lockmgr(&adapter->core_lock, LK_RELEASE); + IXGBE_CORE_UNLOCK(adapter); return; watchdog: @@ -2091,7 +2091,7 @@ watchdog: adapter->watchdog_events++; ixgbe_init_locked(adapter); - lockmgr(&adapter->core_lock, LK_RELEASE); + IXGBE_CORE_UNLOCK(adapter); } /*