summaryrefslogtreecommitdiff
path: root/wct4xxp
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-06-11 22:10:59 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-06-11 22:10:59 +0000
commit6986dd77165260a03dc0d7cf63c062f28056cb82 (patch)
tree896c9f1af1cf4ec9aea111fc315b365327a10a2b /wct4xxp
parent2d939361e5740352dd9e5446a35d8e6cb8b6f772 (diff)
Make the version check optional
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2633 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp')
-rw-r--r--wct4xxp/base.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c
index 7ea55a2..307654f 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -174,6 +174,7 @@ static inline int t4_queue_work(struct workqueue_struct *wq, struct work_struct
#endif
+static int pedanticpci = 1;
static int debug=0;
static int timingcable;
static int highestorder;
@@ -412,9 +413,11 @@ static inline void __t4_pci_out(struct t4 *wc, const unsigned int addr, const un
{
unsigned int tmp;
writel(value, &wc->membase[addr]);
- tmp = __t4_pci_in(wc, WC_VERSION);
- if ((tmp & 0xffff0000) != 0xc01a0000)
- printk("TE4XXP: Version Synchronization Error!\n");
+ if (pedanticpci) {
+ tmp = __t4_pci_in(wc, WC_VERSION);
+ if ((tmp & 0xffff0000) != 0xc01a0000)
+ printk("TE4XXP: Version Synchronization Error!\n");
+ }
#if 0
tmp = le32_to_cpu(wc->membase[addr]);
if ((value != tmp) && (addr != WC_LEDS) && (addr != WC_LDATA) &&
@@ -501,7 +504,9 @@ static inline unsigned int __t4_framer_in(struct t4 *wc, int unit, const unsigne
unit &= 0x3;
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff) | ( 1 << 10) | WC_LREAD);
- __t4_pci_out(wc, WC_VERSION, 0);
+ if (pedanticpci) {
+ __t4_pci_out(wc, WC_VERSION, 0);
+ }
ret = __t4_pci_in(wc, WC_LDATA);
__t4_pci_out(wc, WC_LADDR, 0);
return ret & 0xff;
@@ -3436,6 +3441,7 @@ MODULE_ALIAS("wct2xxp");
MODULE_LICENSE("GPL");
#endif
#ifdef LINUX26
+module_param(pedanticpci, int, 0600);
module_param(debug, int, 0600);
module_param(loopback, int, 0600);
module_param(noburst, int, 0600);
@@ -3452,6 +3458,7 @@ module_param(vpmspans, int, 0600);
module_param(dtmfthreshold, int, 0600);
#endif
#else
+MODULE_PARM(pedanticpci, "i");
MODULE_PARM(debug, "i");
MODULE_PARM(loopback, "i");
MODULE_PARM(noburst, "i");