[dahdi-commits] sruffell: branch linux/sruffell/improved_ecreference r7032 - /linux/team/sruf...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Aug 17 16:20:32 CDT 2009
Author: sruffell
Date: Mon Aug 17 16:20:28 2009
New Revision: 7032
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7032
Log:
wctdm24xxp-wip: Make sure both the transmit and receive waits for init.
Modified:
linux/team/sruffell/improved_ecreference/drivers/dahdi/wctdm24xxp/base.c
Modified: linux/team/sruffell/improved_ecreference/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/improved_ecreference/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=7032&r1=7031&r2=7032
==============================================================================
--- linux/team/sruffell/improved_ecreference/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/improved_ecreference/drivers/dahdi/wctdm24xxp/base.c Mon Aug 17 16:20:28 2009
@@ -840,12 +840,11 @@
/* Calculate Transmission */
if (likely(wc->initialized)) {
dahdi_transmit(&wc->span);
- }
-
- for (x = 0; x < wc->cards; x++) {
- if (wc->cardflag & (1 << x)) {
- __kfifo_put(wc->ec_reference[x],
- wc->chans[x]->writechunk, DAHDI_CHUNKSIZE);
+ for (x = 0; x < wc->desc->ports; x++) {
+ if (wc->cardflag & (1 << x)) {
+ __kfifo_put(wc->ec_reference[x],
+ wc->chans[x]->writechunk, DAHDI_CHUNKSIZE);
+ }
}
}
@@ -3785,18 +3784,7 @@
init_waitqueue_head(&wc->regq);
- for (i = 0; i < wc->cards; i++) {
- if (!(wc->chans[i] = kmalloc(sizeof(*wc->chans[i]), GFP_KERNEL))) {
- free_wc(wc);
- return -ENOMEM;
- }
- memset(wc->chans[i], 0, sizeof(*wc->chans[i]));
- if (!(wc->ec[i] = kmalloc(sizeof(*wc->ec[i]), GFP_KERNEL))) {
- free_wc(wc);
- return -ENOMEM;
- }
- memset(wc->ec[i], 0, sizeof(*wc->ec[i]));
-
+ for (i = 0; i < ARRAY_SIZE(wc->ec_reference); ++i) {
wc->ec_reference[i] = kfifo_alloc(DAHDI_CHUNKSIZE *
VOICEBUS_MAX_LATENCY,
GFP_KERNEL, &wc->reglock);
@@ -3807,6 +3795,20 @@
free_wc(wc);
return ret;
}
+ }
+
+ for (i = 0; i < wc->cards; i++) {
+ if (!(wc->chans[i] = kmalloc(sizeof(*wc->chans[i]), GFP_KERNEL))) {
+ free_wc(wc);
+ return -ENOMEM;
+ }
+ memset(wc->chans[i], 0, sizeof(*wc->chans[i]));
+ if (!(wc->ec[i] = kmalloc(sizeof(*wc->ec[i]), GFP_KERNEL))) {
+ free_wc(wc);
+ return -ENOMEM;
+ }
+ memset(wc->ec[i], 0, sizeof(*wc->ec[i]));
+
}
More information about the dahdi-commits
mailing list