[zaptel-commits] mattf: branch 1.2 r3263 - in /branches/1.2: wct4xxp/vpm450m.c zconfig.h

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Nov 30 14:17:43 CST 2007


Author: mattf
Date: Fri Nov 30 14:17:42 2007
New Revision: 3263

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3263
Log:
Make sure we only disable irqs during octasic firmware load only if we have 4K stacks

Modified:
    branches/1.2/wct4xxp/vpm450m.c
    branches/1.2/zconfig.h

Modified: branches/1.2/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/vpm450m.c?view=diff&rev=3263&r1=3262&r2=3263
==============================================================================
--- branches/1.2/wct4xxp/vpm450m.c (original)
+++ branches/1.2/wct4xxp/vpm450m.c Fri Nov 30 14:17:42 2007
@@ -10,9 +10,16 @@
 #include <linux/vmalloc.h>
 #include <linux/string.h>
 #include <linux/time.h>
+#include <linux/version.h>
 
 #include "vpm450m.h"
 #include "oct6100api/oct6100_api.h"
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+#include <linux/config.h>
+#else
+#include <linux/autoconf.h>
+#endif
 
 /* API for Octasic access */
 UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime)
@@ -407,7 +414,9 @@
 	UINT32 ulResult;
 	struct vpm450m *vpm450m;
 	int x,y,law;
+#ifdef CONFIG_4KSTACKS
 	unsigned long flags;
+#endif
 	
 	if (!(vpm450m = kmalloc(sizeof(struct vpm450m), GFP_KERNEL)))
 		return NULL;
@@ -481,11 +490,15 @@
 	 * stack unfriendly.  Stupid, stupid, stupid.  So we disable IRQs so we
 	 * don't run the risk of overflowing the stack while we initialize the
 	 * octasic. */
+#ifdef CONFIG_4KSTACKS
 	local_irq_save(flags);
+#endif
 	ulResult = Oct6100ChipOpen(vpm450m->pApiInstance, ChipOpen);
 	if (ulResult != cOCT6100_ERR_OK) {
 		printk("Failed to open chip, code %08x!\n", ulResult);
+#ifdef CONFIG_4KSTACKS
 		local_irq_restore(flags);
+#endif
 		kfree(vpm450m);
 		kfree(ChipOpen);
 		kfree(ChannelOpen);
@@ -540,7 +553,9 @@
 		}
 	}
 
+#ifdef CONFIG_4KSTACKS
 	local_irq_restore(flags);
+#endif
 	kfree(ChipOpen);
 	kfree(ChannelOpen);
 	return vpm450m;

Modified: branches/1.2/zconfig.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/zconfig.h?view=diff&rev=3263&r1=3262&r2=3263
==============================================================================
--- branches/1.2/zconfig.h (original)
+++ branches/1.2/zconfig.h Fri Nov 30 14:17:42 2007
@@ -9,6 +9,8 @@
 #include <linux/version.h>
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 #include <linux/config.h>
+#else
+#include <linux/autoconf.h>
 #endif
 #endif
 




More information about the zaptel-commits mailing list