[svn-commits] sruffell: linux/trunk r9953 - /linux/trunk/drivers/dahdi/wcte12xp/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jun 2 15:02:41 CDT 2011
Author: sruffell
Date: Thu Jun 2 15:02:38 2011
New Revision: 9953
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9953
Log:
wcte12xp: Limit how many consecutive times to reset the VPMADT032 module.
Both limit the amount of junk in the kernel log and also prevent dahdi_cfg
from running indefinitely if there is a module with a hardware problem which
prevents it from completing the startup sequence.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/drivers/dahdi/wcte12xp/base.c
linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9953&r1=9952&r2=9953
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Thu Jun 2 15:02:38 2011
@@ -2145,6 +2145,16 @@
#endif
int res;
u16 version;
+ const int MAX_CHECKS = 5;
+
+ /* If there is a failed VPM module, do not block dahdi_cfg
+ * indefinitely. */
+ if (++wc->vpm_check_count > MAX_CHECKS) {
+ set_bit(READY, &wc->bit_flags);
+ wc->vpm_check = MAX_JIFFY_OFFSET;
+ t1_info(wc, "Disabling VPMADT032 Checking.\n");
+ return;
+ }
if (!test_bit(INITIALIZED, &wc->bit_flags))
return;
@@ -2154,6 +2164,7 @@
if (!res) {
set_bit(VPM150M_ACTIVE, &wc->ctlreg);
wc->vpm_check = jiffies + HZ*5;
+ wc->vpm_check_count = 0;
return;
}
Modified: linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h?view=diff&rev=9953&r1=9952&r2=9953
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/wcte12xp.h Thu Jun 2 15:02:38 2011
@@ -115,6 +115,7 @@
unsigned long bit_flags;
unsigned long alarmtimer;
unsigned char ledstate;
+ unsigned char vpm_check_count;
struct dahdi_span span; /* Span */
struct dahdi_chan *chans[32]; /* Channels */
struct dahdi_echocan_state *ec[32]; /* Echocan state for channels */
More information about the svn-commits
mailing list