ixgbe: replace direct lockmgr calls by macros
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 12 Aug 2012 16:57:10 +0000 (18:57 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 12 Aug 2012 17:04:08 +0000 (19:04 +0200)
Only 3 lines didn't use the IXGBE_CORE_LOCK/UNLOCK() abstractions

sys/dev/netif/ixgbe/ixgbe.c

index e351049..8ba4f72 100644 (file)
@@ -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);
 }
 
 /*