[zaptel-commits] mattf: branch 1.2 r2633 - /branches/1.2/wct4xxp/base.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Mon Jun 11 15:10:59 MST 2007


Author: mattf
Date: Mon Jun 11 17:10:59 2007
New Revision: 2633

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2633
Log:
Make the version check optional

Modified:
    branches/1.2/wct4xxp/base.c

Modified: branches/1.2/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/base.c?view=diff&rev=2633&r1=2632&r2=2633
==============================================================================
--- branches/1.2/wct4xxp/base.c (original)
+++ branches/1.2/wct4xxp/base.c Mon Jun 11 17:10:59 2007
@@ -174,6 +174,7 @@
 
 #endif
 
+static int pedanticpci = 1;
 static int debug=0;
 static int timingcable;
 static int highestorder;
@@ -412,9 +413,11 @@
 {
 	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 @@
 	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_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(dtmfthreshold, int, 0600);
 #endif
 #else
+MODULE_PARM(pedanticpci, "i");
 MODULE_PARM(debug, "i");
 MODULE_PARM(loopback, "i");
 MODULE_PARM(noburst, "i");



More information about the zaptel-commits mailing list