[zaptel-commits] mattf: branch mattf/zaptel-1.4-stackcleanup r4177 - /team/mattf/zaptel-1.4-st...
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Fri Apr 18 14:19:12 CDT 2008
Author: mattf
Date: Fri Apr 18 14:19:11 2008
New Revision: 4177
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4177
Log:
Fix for firmware delay problems with VPM450M
Modified:
team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/base.c
team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/wct4xxp.h
Modified: team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/base.c?view=diff&rev=4177&r1=4176&r2=4177
==============================================================================
--- team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/base.c (original)
+++ team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/base.c Fri Apr 18 14:19:11 2008
@@ -330,6 +330,9 @@
unsigned long memlen;
volatile unsigned int *membase; /* Base address of card */
+ /* Add this for our softlockup protector */
+ unsigned int oct_rw_count;
+
/* Flags for our bottom half */
unsigned long checkflag;
struct tasklet_struct t4_tlet;
@@ -416,7 +419,8 @@
* transactions, some host bridges appear to generate them.
* This delay prevents this.
*/
- udelay(3);
+ if (!test_bit(T4_LOADING_FW, &wc->checkflag))
+ udelay(3);
}
return res;
}
@@ -430,7 +434,8 @@
* transactions, some host bridges appear to generate them.
* This delay prevents this.
*/
- udelay(3);
+ if (!test_bit(T4_LOADING_FW, &wc->checkflag))
+ udelay(3);
tmp = __t4_pci_in(wc, WC_VERSION);
if ((tmp & 0xffff0000) != 0xc01a0000)
printk("TE4XXP: Version Synchronization Error!\n");
@@ -655,6 +660,16 @@
{
unsigned long flags;
unsigned int ret;
+
+#if 0
+#ifdef CONFIG_DETECT_SOFTLOCKUP
+ if (!in_irq() && test_bit(T4_LOADING_FW, &wc->checkflag) && !(wc->oct_rw_count++ % 2000)) {
+ //printk("Hit\n");
+ //touch_softlockup_watchdog();
+ //touch_all_softlockup_watchdogs();
+ }
+#endif
+#endif
spin_lock_irqsave(&wc->reglock, flags);
ret = __t4_oct_in(wc, addr);
spin_unlock_irqrestore(&wc->reglock, flags);
@@ -716,6 +731,17 @@
static inline void t4_oct_out(struct t4 *wc, const unsigned int addr, const unsigned int value)
{
unsigned long flags;
+
+#if 0
+#ifdef CONFIG_DETECT_SOFTLOCKUP
+ if (!in_irq() && test_bit(T4_LOADING_FW, &wc->checkflag) && !(wc->oct_rw_count++ % 2000)) {
+ //printk("Hit\n");
+ //touch_softlockup_watchdog();
+ //touch_all_softlockup_watchdogs();
+ }
+#endif
+#endif
+
spin_lock_irqsave(&wc->reglock, flags);
__t4_oct_out(wc, addr, value);
spin_unlock_irqrestore(&wc->reglock, flags);
@@ -3182,12 +3208,15 @@
return;
}
+ set_bit(T4_LOADING_FW, &wc->checkflag);
if (!(wc->vpm450m = init_vpm450m(wc, laws, wc->numspans, firmware))) {
printk("VPM450: Failed to initialize\n");
if (firmware != &embedded_firmware)
release_firmware(firmware);
+ clear_bit(T4_LOADING_FW, &wc->checkflag);
return;
}
+ clear_bit(T4_LOADING_FW, &wc->checkflag);
if (firmware != &embedded_firmware)
release_firmware(firmware);
Modified: team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/wct4xxp.h
URL: http://svn.digium.com/view/zaptel/team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/wct4xxp.h?view=diff&rev=4177&r1=4176&r2=4177
==============================================================================
--- team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/wct4xxp.h (original)
+++ team/mattf/zaptel-1.4-stackcleanup/kernel/wct4xxp/wct4xxp.h Fri Apr 18 14:19:11 2008
@@ -106,6 +106,7 @@
};
#define T4_CHECK_VPM 0
+#define T4_LOADING_FW 1
#define WCT4_GET_REGS _IOW (ZT_CODE, 60, struct t4_regs)
More information about the zaptel-commits
mailing list