[zaptel-commits] sruffell: branch 1.4 r4655 - in /branches/1.4/kernel: ./ wctdm24xxp/
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Thu Jun 18 11:29:12 CDT 2009
Author: sruffell
Date: Thu Jun 18 11:29:08 2009
New Revision: 4655
URL: http://svn.asterisk.org/svn-view/zaptel?view=rev&rev=4655
Log:
wctdm24xxp, voicebus: Enable the watchdog for the wctdm24xxp driver.
Allows the wctdm24xxp driver to use the default dahdi watchdog facility to
kickstart the board in case it stops generating interrupts. DAHDI-254.
Modified:
branches/1.4/kernel/voicebus.c
branches/1.4/kernel/voicebus.h
branches/1.4/kernel/wctdm24xxp/base.c
branches/1.4/kernel/zconfig.h
Modified: branches/1.4/kernel/voicebus.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/voicebus.c?view=diff&rev=4655&r1=4654&r2=4655
==============================================================================
--- branches/1.4/kernel/voicebus.c (original)
+++ branches/1.4/kernel/voicebus.c Thu Jun 18 11:29:08 2009
@@ -39,6 +39,7 @@
#include <linux/interrupt.h>
#include <linux/timer.h>
+#include "zconfig.h"
#include "voicebus.h"
#define assert(__x__) BUG_ON(!(__x__))
@@ -846,6 +847,7 @@
__vb_setctl(vb, IER_CSR7, 0);
}
+
static void
vb_disable_interrupts(struct voicebus *vb)
{
@@ -946,6 +948,19 @@
return 0;
}
+
+#ifdef CONFIG_ZAPTEL_WATCHDOG
+/**
+ * voicebus_watchdog - Called from a watchdog function to restart interrupts.
+ *
+ */
+int voicebus_watchdog(struct voicebus *vb)
+{
+ vb_tx_demand_poll(vb);
+ return 0;
+}
+EXPORT_SYMBOL(voicebus_watchdog);
+#endif
static void
vb_clear_start_transmit_bit(struct voicebus *vb)
Modified: branches/1.4/kernel/voicebus.h
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/voicebus.h?view=diff&rev=4655&r1=4654&r2=4655
==============================================================================
--- branches/1.4/kernel/voicebus.h (original)
+++ branches/1.4/kernel/voicebus.h Thu Jun 18 11:29:08 2009
@@ -50,5 +50,8 @@
int voicebus_transmit(struct voicebus *vb, void *vbb);
int voicebus_set_minlatency(struct voicebus *vb, unsigned int milliseconds);
int voicebus_current_latency(struct voicebus *vb) ;
+#ifdef CONFIG_ZAPTEL_WATCHDOG
+int voicebus_watchdog(struct voicebus *vb);
+#endif
#endif /* __VOICEBUS_H__ */
Modified: branches/1.4/kernel/wctdm24xxp/base.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/wctdm24xxp/base.c?view=diff&rev=4655&r1=4654&r2=4655
==============================================================================
--- branches/1.4/kernel/wctdm24xxp/base.c (original)
+++ branches/1.4/kernel/wctdm24xxp/base.c Thu Jun 18 11:29:08 2009
@@ -2704,11 +2704,16 @@
return 0;
}
+#ifdef CONFIG_ZAPTEL_WATCHDOG
static int wctdm_watchdog(struct zt_span *span, int event)
{
+ struct wctdm *wc = span->pvt;
printk("TDM: Called watchdog\n");
+ if (ZT_WATCHDOG_NOINTS == event)
+ voicebus_watchdog(wc->vb);
return 0;
}
+#endif
static int wctdm_close(struct zt_chan *chan)
{
@@ -2960,7 +2965,9 @@
wc->span.close = wctdm_close;
wc->span.flags = ZT_FLAG_RBS;
wc->span.ioctl = wctdm_ioctl;
+#ifdef CONFIG_ZAPTEL_WATCHDOG
wc->span.watchdog = wctdm_watchdog;
+#endif
wc->span.dacs= wctdm_dacs;
#ifdef VPM_SUPPORT
wc->span.echocan_with_params = wctdm_echocan_with_params;
Modified: branches/1.4/kernel/zconfig.h
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/zconfig.h?view=diff&rev=4655&r1=4654&r2=4655
==============================================================================
--- branches/1.4/kernel/zconfig.h (original)
+++ branches/1.4/kernel/zconfig.h Thu Jun 18 11:29:08 2009
@@ -147,7 +147,7 @@
* Uncomment to enable "watchdog" to monitor if interfaces
* stop taking interrupts or otherwise misbehave
*/
-/* #define CONFIG_ZAPTEL_WATCHDOG */
+#define CONFIG_ZAPTEL_WATCHDOG
/*
* Uncomment for Non-standard FXS groundstart start state (A=Low, B=Low)
More information about the zaptel-commits
mailing list