[svn-commits] sruffell: branch linux/2.2 r6860 - in /linux/branches/2.2: ./ drivers/dahdi/ ...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 21 09:56:53 CDT 2009


Author: sruffell
Date: Tue Jul 21 09:56:49 2009
New Revision: 6860

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6860
Log:
Merged revisions 6712,6776,6799,6801,6803 via svnmerge from 
https://origsvn.digium.com/svn/dahdi/linux/trunk

........
  r6712 | sruffell | 2009-06-24 14:13:35 -0500 (Wed, 24 Jun 2009) | 4 lines
  
  wct4xxp, wcte11xp: Use the default configuration by default at startup.
  
  This change allows hardware to provide timing to asterisk before normal
  configuration.  DAHDI-275.
........
  r6776 | sruffell | 2009-06-26 16:24:34 -0500 (Fri, 26 Jun 2009) | 4 lines
  
  voicebus: Limit the string length of the vpm workqueue name.
  
  On older kernels, it is possible to cause a kernel panic if the lenght of the
  workqueue name is greater than 10. DAHDI-276.
........
  r6799 | sruffell | 2009-06-30 10:45:06 -0500 (Tue, 30 Jun 2009) | 5 lines
  
  wcb4xxp: Start the first span with default settings on load.
  
  One of the spans of the B410P is now started at driver load time in order to
  allow it to provide early timing to asterisk, before the card has been
  properly configured.
........
  r6801 | sruffell | 2009-06-30 12:17:09 -0500 (Tue, 30 Jun 2009) | 5 lines
  
  echocan: Do not call through NULL 'echocan_traintap' pointer.
  
  This resolves an issue with a kernel panic if echotraining is enabled in the
  Asterisk configuration file, but the echocan on the channel (which may be a
  hardware echocanceller) has not defined that operation. DAHDI-272.
........
  r6803 | sruffell | 2009-06-30 12:27:34 -0500 (Tue, 30 Jun 2009) | 1 line
  
  echocan: Do not go into PRETRAINING mode if not supported by the echocan.
........

Modified:
    linux/branches/2.2/   (props changed)
    linux/branches/2.2/drivers/dahdi/dahdi-base.c
    linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c
    linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c
    linux/branches/2.2/drivers/dahdi/wct4xxp/base.c
    linux/branches/2.2/drivers/dahdi/wcte11xp.c

Propchange: linux/branches/2.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jul 21 09:56:49 2009
@@ -1,1 +1,1 @@
-/linux/trunk:1-6696
+/linux/trunk:1-6696,6712-6713,6715-6716,6718-6759,6761-6767,6769-6770,6772-6779,6781-6784,6786-6790,6792-6793,6795-6796,6798-6803

Modified: linux/branches/2.2/drivers/dahdi/dahdi-base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/dahdi-base.c?view=diff&rev=6860&r1=6859&r2=6860
==============================================================================
--- linux/branches/2.2/drivers/dahdi/dahdi-base.c (original)
+++ linux/branches/2.2/drivers/dahdi/dahdi-base.c Tue Jul 21 09:56:49 2009
@@ -5225,14 +5225,18 @@
 		if ((j < 0) || (j >= DAHDI_MAX_PRETRAINING))
 			return -EINVAL;
 		j <<= 3;
+		spin_lock_irqsave(&chan->lock, flags);
 		if (chan->ec_state) {
 			/* Start pretraining stage */
-			spin_lock_irqsave(&chan->lock, flags);
-			chan->ec_state->status.mode = ECHO_MODE_PRETRAINING;
-			chan->ec_state->status.pretrain_timer = j;
+			if (chan->ec_state->ops->echocan_traintap) {
+				chan->ec_state->status.mode = ECHO_MODE_PRETRAINING;
+				chan->ec_state->status.pretrain_timer = j;
+			}
 			spin_unlock_irqrestore(&chan->lock, flags);
-		} else
+		} else {
+			spin_unlock_irqrestore(&chan->lock, flags);
 			return -EINVAL;
+		}
 		break;
 	case DAHDI_ECHOCANCEL_FAX_MODE:
 		if (!chan->ec_state) {
@@ -6639,7 +6643,8 @@
 					ss->ec_state->status.last_train_tap = 0;
 					ss->ec_state->status.mode = ECHO_MODE_TRAINING;
 				}
-				if (ss->ec_state->status.mode == ECHO_MODE_TRAINING) {
+				if ((ss->ec_state->status.mode == ECHO_MODE_TRAINING) &&
+				    (ss->ec_state->ops->echocan_traintap)) {
 					if (ss->ec_state->ops->echocan_traintap(ss->ec_state, ss->ec_state->status.last_train_tap++, rxlin)) {
 #if 0
 						module_printk(KERN_NOTICE, "Finished training (%d taps trained)!\n", ss->ec_state->status.last_train_tap);

Modified: linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=6860&r1=6859&r2=6860
==============================================================================
--- linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/branches/2.2/drivers/dahdi/voicebus/GpakCust.c Tue Jul 21 09:56:49 2009
@@ -403,8 +403,13 @@
 	if (!vpm)
 		return NULL;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
+	/* There is a limit on the length of the name of the workqueue. */
+	strcpy(vpm->wq_name, "vpmadt032");
+#else
 	strcpy(vpm->wq_name, board_name);
 	strcat(vpm->wq_name, suffix);
+#endif
 
 	/* Init our vpmadt032 struct */
 	memcpy(&vpm->options, options, sizeof(*options));

Modified: linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=6860&r1=6859&r2=6860
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wcb4xxp/base.c Tue Jul 21 09:56:49 2009
@@ -2,7 +2,7 @@
  * WCB410P  Quad-BRI PCI Driver
  * Written by Andrew Kohlsmith <akohlsmith at mixdown.ca>
  *
- * Copyright (C) 2008 Digium, Inc.
+ * Copyright (C) 2009 Digium, Inc.
  * All rights reserved.
  *
  */
@@ -2486,6 +2486,11 @@
 }
 #endif /* CREATE_WCB4XXP_PROCFS_ENTRY */
 
+static int b4xxp_startdefaultspan(struct b4xxp *b4)
+{
+	struct dahdi_lineconfig lc = {0,};
+	return b4xxp_spanconfig(&b4->spans[0].span, &lc);
+}
 
 static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
@@ -2597,6 +2602,7 @@
 			goto err_out_unreg_spans;
 		}
 	}
+
 
 
 #if 0
@@ -2621,6 +2627,10 @@
 	dev_info(b4->dev, "Did not do the highestorder stuff\n");
 #endif
 
+	ret = b4xxp_startdefaultspan(b4);
+	if (ret)
+		goto err_out_unreg_spans;
+
 	ret = 0;
 	return ret;
 

Modified: linux/branches/2.2/drivers/dahdi/wct4xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/wct4xxp/base.c?view=diff&rev=6860&r1=6859&r2=6860
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wct4xxp/base.c Tue Jul 21 09:56:49 2009
@@ -6,7 +6,7 @@
  * written by Jim Dixon <jim at lambdatel.com>.
  *
  * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
- * Copyright (C) 2001-2005, Digium, Inc.
+ * Copyright (C) 2001-2009, Digium, Inc.
  *
  * All rights reserved.
  *
@@ -3547,6 +3547,12 @@
 	__t4_set_timing_source(wc,4, 0, 0);
 	spin_unlock_irqrestore(&wc->reglock, flags);
 	tasklet_init(&wc->t4_tlet, t4_isr_bh, (unsigned long)wc);
+
+	/* Start the first span on the card with the default configuration so
+	 * that it may provide timing to Asterisk before being properly
+	 * configured. */
+	t4_startup(&wc->tspans[0]->span);
+
 	return 0;
 }
 

Modified: linux/branches/2.2/drivers/dahdi/wcte11xp.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/wcte11xp.c?view=diff&rev=6860&r1=6859&r2=6860
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wcte11xp.c (original)
+++ linux/branches/2.2/drivers/dahdi/wcte11xp.c Tue Jul 21 09:56:49 2009
@@ -5,7 +5,7 @@
  *            Matthew Fredrickson <creslin at digium.com>
  *            William Meadows <wmeadows at digium.com>
  *
- * Copyright (C) 2004, Digium, Inc.
+ * Copyright (C) 2004-2009, Digium, Inc.
  *
  * All rights reserved.
  */
@@ -1013,6 +1013,11 @@
 		printk(KERN_NOTICE "Unable to register span with DAHDI\n");
 		return -1;
 	}
+
+	/* Start off with the defaults so this card can provide timing to
+	 * Asterisk before being properly configured. */
+	t1xxp_startup(&wc->span);
+
 	return 0;
 }
 




More information about the svn-commits mailing list