From 59d2904862ec234aae3c1a072bd8402d033eab97 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 11 Jun 2007 22:13:53 +0000 Subject: Merged revisions 2634 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r2634 | mattf | 2007-06-11 17:12:04 -0500 (Mon, 11 Jun 2007) | 9 lines Merged revisions 2633 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r2633 | mattf | 2007-06-11 17:10:59 -0500 (Mon, 11 Jun 2007) | 1 line Make the version check optional ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2637 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp/base.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wct4xxp/base.c b/wct4xxp/base.c index a1add2f..bbef216 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -165,7 +165,8 @@ static inline int t4_queue_work(struct workqueue_struct *wq, struct work_struct #endif -static int debug=0x0; +static int pedanticpci = 1; +static int debug=0; static int timingcable = 0; static int highestorder; static int t1e1override = -1; //0xFF; // -1 = jumper; 0xFF = E1 @@ -415,9 +416,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 = __t4_pci_in(wc, addr); if ((value != tmp) && (addr != WC_LEDS) && (addr != WC_LDATA) && @@ -504,7 +507,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) | WC_LFRMR_CS | 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, (unit << 8) | (addr & 0xff)); return ret & 0xff; @@ -3783,6 +3788,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); @@ -3798,6 +3804,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