diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-25 22:10:33 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-09-25 22:10:33 +0000 |
commit | 5709bd1a77310b3bf9ff4e26ef63f947f0e3c2d8 (patch) | |
tree | 7a2529791b1c7a3acf276970bd36456c18a1b125 | |
parent | fbdce04175f148e379a3bfb75b4879e07d59d7ac (diff) |
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
-rwxr-xr-x | wctdm.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 */ |