From 5709bd1a77310b3bf9ff4e26ef63f947f0e3c2d8 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Sun, 25 Sep 2005 22:10:33 +0000 Subject: uhhhh... make that last one actually work the way it was intended to git-svn-id: http://svn.digium.com/svn/zaptel/trunk@775 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wctdm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wctdm.c b/wctdm.c index d4df2b2..aa171b6 100755 --- a/wctdm.c +++ b/wctdm.c @@ -281,6 +281,12 @@ struct calregs { unsigned char vals[NUM_CAL_REGS]; }; +enum proslic_power_warn { + PROSLIC_POWER_UNKNOWN = 0, + PROSLIC_POWER_ON, + PROSLIC_POWER_WARNED, +}; + struct wctdm { struct pci_dev *dev; char *variety; @@ -295,7 +301,7 @@ struct wctdm { int alt; int curcard; int cardflag; /* Bit-map of present cards */ - int proslic_power; + enum proslic_power_warn proslic_power; spinlock_t lock; union { @@ -1238,16 +1244,17 @@ static int wctdm_powerup_proslic(struct wctdm *wc, int card, int fast) } } - if ((vbat < 0xc0) && !wc->proslic_power) { + if ((vbat < 0xc0) && (wc->proslic_power == PROSLIC_POWER_UNKNOWN)) { printk("ProSLIC on module %d failed to powerup within %d ms (%d mV only)\n\n -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM400P??\n", card, (int)(((jiffies - origjiffies) * 1000 / HZ)), vbat * 375); + wc->proslic_power = PROSLIC_POWER_WARNED; return -1; } else if (debug) { printk("ProSLIC on module %d powered up to -%d volts (%02x) in %d ms\n", card, vbat * 376 / 1000, vbat, (int)(((jiffies - origjiffies) * 1000 / HZ))); } - wc->proslic_power = 1; + wc->proslic_power = PROSLIC_POWER_ON; /* Proslic max allowed loop current, reg 71 LOOP_I_LIMIT */ /* If out of range, just set it to the default value */ -- cgit v1.2.3