diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-06-01 17:09:47 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-06-01 17:09:47 +0000 |
commit | 3aee761bb76ee9d711ffe71f93efb78fc575f5ae (patch) | |
tree | 37e28cfa85cbdde8c193b1654e08f2f46e27200b | |
parent | ac88d4096d36c2bc10bb95fc8a289bf33b038259 (diff) |
Merged revisions 2551 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
................
r2551 | mattf | 2007-06-01 12:06:29 -0500 (Fri, 01 Jun 2007) | 10 lines
Merged revisions 2550 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r2550 | mattf | 2007-06-01 11:56:09 -0500 (Fri, 01 Jun 2007) | 2 lines
Fix for stack overflow on FC6 and VPM450M.
........
................
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2552 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | wct4xxp/vpm450m.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c index f4a3e8d..a12b435 100644 --- a/wct4xxp/vpm450m.c +++ b/wct4xxp/vpm450m.c @@ -407,6 +407,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f UINT32 ulResult; struct vpm450m *vpm450m; int x,y,law; + unsigned long flags; if (!(vpm450m = kmalloc(sizeof(struct vpm450m), GFP_KERNEL))) return NULL; @@ -476,9 +477,16 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f return NULL; } + /* I don't know what to curse more in this comment, the problems caused by + * the 4K kernel stack limit change or the octasic API for being so darn + * 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. */ + local_irq_save(flags); ulResult = Oct6100ChipOpen(vpm450m->pApiInstance, ChipOpen); if (ulResult != cOCT6100_ERR_OK) { printk("Failed to open chip, code %08x!\n", ulResult); + local_irq_restore(flags); kfree(vpm450m); kfree(ChipOpen); kfree(ChannelOpen); @@ -533,6 +541,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f } } + local_irq_restore(flags); kfree(ChipOpen); kfree(ChannelOpen); return vpm450m; |