diff options
Diffstat (limited to 'wct4xxp/vpm450m.c')
-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; |