[Asterisk-cvs] zaptel wctdm.c,1.123,1.124
kpfleming
kpfleming
Sun Sep 25 18:13:35 CDT 2005
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv15212
Modified Files:
wctdm.c
Log Message:
uhhhh... make that last one actually work the way it was intended to
Index: wctdm.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wctdm.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- wctdm.c 25 Sep 2005 22:05:36 -0000 1.123
+++ wctdm.c 25 Sep 2005 22:10:33 -0000 1.124
@@ -281,6 +281,12 @@
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 @@
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 @@
}
}
- 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 */
More information about the svn-commits
mailing list