From 6986dd77165260a03dc0d7cf63c062f28056cb82 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 11 Jun 2007 22:10:59 +0000 Subject: Make the version check optional git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2633 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp/base.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'wct4xxp') 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"); -- cgit v1.2.3