[dahdi-commits] fjoe: freebsd/trunk r9182 - /freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 24 02:58:31 CDT 2010
Author: fjoe
Date: Tue Aug 24 02:58:28 2010
New Revision: 9182
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9182
Log:
Implement vb_enable/disable_deferred() properly.
Modified:
freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
Modified: freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9182&r1=9181&r2=9182
==============================================================================
--- freebsd/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ freebsd/trunk/drivers/dahdi/voicebus/voicebus.c Tue Aug 24 02:58:28 2010
@@ -581,7 +581,9 @@
static inline void vb_disable_deferred(struct voicebus *vb)
{
-#if !defined(__FreeBSD__)
+#if defined(__FreeBSD__)
+ atomic_inc(&vb->deferred_disabled_count);
+#else
if (atomic_inc_return(&vb->deferred_disabled_count) == 1)
disable_irq(vb->pdev->irq);
#endif
@@ -589,7 +591,9 @@
static inline void vb_enable_deferred(struct voicebus *vb)
{
-#if !defined(__FreeBSD__)
+#if defined(__FreeBSD__)
+ atomic_dec(&vb->deferred_disabled_count);
+#else
if (atomic_dec_return(&vb->deferred_disabled_count) == 0)
enable_irq(vb->pdev->irq);
#endif
@@ -1872,6 +1876,11 @@
{
struct voicebus *vb = dev_id;
u32 int_status;
+
+#if defined(CONFIG_VOICEBUS_INTERRUPT) && defined(__FreeBSD__)
+ if (atomic_read(&vb->deferred_disabled_count))
+ return;
+#endif
int_status = __vb_getctl(vb, SR_CSR5);
/* Mask out the reserved bits. */
More information about the dahdi-commits
mailing list