diff options
author | Russ Meyerriecks <rmeyerreicks@digium.com> | 2010-01-18 21:00:22 +0000 |
---|---|---|
committer | Russ Meyerriecks <rmeyerreicks@digium.com> | 2010-01-18 21:00:22 +0000 |
commit | a27e6fbc695712d846c13b9b7de006e885d71fe2 (patch) | |
tree | ac1624717abcc4485a98239374c7b81c7cd521b3 | |
parent | 899b91d299efc84c69923ea2d40e24075a2d3817 (diff) |
wct4xxp: Make Missed interrupt message off by default, and incrementing
irqmisses if we have to do a latency bump
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7933 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 0ce2fa1..dfce2d7 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -1684,8 +1684,8 @@ void setup_chunks(struct t4 *wc, int which) for (x = 0; x < wc->numspans; x++) { ts = wc->tspans[x]; - ts->writechunk = (void *)(wc->writechunk + x * 32 * 2); - ts->readchunk = (void *)(wc->readchunk + x * 32 * 2); + ts->writechunk = (void *)(wc->writechunk + (x * 32 * 2) + (which * (1024 >> 2))); + ts->readchunk = (void *)(wc->readchunk + (x * 32 * 2) + (which * (1024 >> 2))); for (y=0;y<wc->tspans[x]->span.channels;y++) { struct dahdi_chan *mychans = ts->chans[y]; if (gen2) { @@ -3301,7 +3301,9 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2) if ((rxident != expected) && !test_bit(T4_IGNORE_LATENCY, &wc->checkflag)) { int needed_latency; - printk("!!! Missed interrupt. Expected ident of %d and got ident of %d\n", expected, rxident); + if (debug & DEBUG_MAIN) + printk("!!! Missed interrupt. Expected ident of %d and got ident of %d\n", expected, rxident); + if (test_bit(T4_IGNORE_LATENCY, &wc->checkflag)) { printk("Should have ignored latency\n"); } @@ -3311,7 +3313,7 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2) needed_latency = (128 - wc->rxident) + rxident; } - needed_latency += 2; + needed_latency += 1; if (needed_latency >= 128) { printk("Truncating latency request to 127 instead of %d\n", needed_latency); @@ -3319,7 +3321,11 @@ DAHDI_IRQ_HANDLER(t4_interrupt_gen2) } if (needed_latency > wc->numbufs) { + int x; + printk("Need to increase latency. Estimated latency should be %d\n", needed_latency); + for (x = 0; x < wc->numspans; x++) + wc->tspans[x]->span.irqmisses++; wc->needed_latency = needed_latency; __t4_pci_out(wc, WC_DMACTRL, 0x00000000); set_bit(T4_CHANGE_LATENCY, &wc->checkflag); |