[svn-commits] kpfleming: branch linux/2.2 r7039 - in /linux/branches/2.2: ./ drivers/dahdi/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 19 11:44:36 CDT 2009


Author: kpfleming
Date: Wed Aug 19 11:44:31 2009
New Revision: 7039

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7039
Log:
Merged revisions 7038 via svnmerge from 
https://origsvn.digium.com/svn/dahdi/linux/trunk

........
  r7038 | kpfleming | 2009-08-19 11:40:13 -0500 (Wed, 19 Aug 2009) | 9 lines
  
  Ensure that dahdi_scan correctly reports VPM presence.
  
  The wct4xxp driver (for the dual/quad span T1/E1 cards) and the wcte12xp
  driver (for the single span VoiceBus-based T1/E1 cards) did not properly
  update the 'devicetype' field reported by dahdi_scan when a VPM was found
  during the card startup process. As a result, dahdi_scan did not show that
  a VPM was present on the card, even if it was.
........

Modified:
    linux/branches/2.2/   (props changed)
    linux/branches/2.2/drivers/dahdi/wct4xxp/base.c
    linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c
    linux/branches/2.2/drivers/dahdi/wcte12xp/base.c

Propchange: linux/branches/2.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 19 11:44:31 2009
@@ -1,1 +1,1 @@
-/linux/trunk:1-6696,6712-6713,6715-6767,6769-6770,6772-6779,6781-6784,6786-6790,6792-6793,6795-6796,6798-6803,6844-6863,6890-6891,6933,6938-6940,6942-6944,6947-6950,6953-6960,6962-6966
+/linux/trunk:1-6696,6712-6713,6715-6767,6769-6770,6772-6779,6781-6784,6786-6790,6792-6793,6795-6796,6798-6803,6844-6863,6890-6891,6933,6938-6940,6942-6944,6947-6950,6953-6960,6962-6966,7038

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=7039&r1=7038&r2=7039
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wct4xxp/base.c Wed Aug 19 11:44:31 2009
@@ -1585,6 +1585,24 @@
 	return 0;
 }
 
+static void set_span_devicetype(struct t4 *wc)
+{
+	int x;
+	struct t4_span *ts;
+
+	for (x = 0; x < wc->numspans; x++) {
+		ts = wc->tspans[x];
+		dahdi_copy_string(ts->span.devicetype, wc->variety, sizeof(ts->span.devicetype));
+		if (wc->vpm == T4_VPM_PRESENT) {
+			if (!wc->vpm450m)
+				strncat(ts->span.devicetype, " (VPM400M)", sizeof(ts->span.devicetype) - 1);
+			else
+				strncat(ts->span.devicetype, (wc->numspans > 2) ? " (VPMOCT128)" : " (VPMOCT064)",
+					sizeof(ts->span.devicetype) - 1);
+		}
+	}
+}
+
 /* The number of cards we have seen with each
    possible 'order' switch setting.
 */
@@ -1606,14 +1624,6 @@
 		snprintf(ts->span.desc, sizeof(ts->span.desc) - 1,
 			 "T%dXXP (PCI) Card %d Span %d", wc->numspans, wc->num, x+1);
 		ts->span.manufacturer = "Digium";
-		dahdi_copy_string(ts->span.devicetype, wc->variety, sizeof(ts->span.devicetype));
-		if (wc->vpm == T4_VPM_PRESENT) {
-			if (!wc->vpm450m)
-				strncat(ts->span.devicetype, " with VPM400M", sizeof(ts->span.devicetype) - 1);
-			else
-				strncat(ts->span.devicetype, (wc->numspans > 2) ? " with VPMOCT128" : " with VPMOCT064",
-					sizeof(ts->span.devicetype) - 1);
-		}
 		if (order_index[wc->order] == 1)
 			snprintf(ts->span.location, sizeof(ts->span.location) - 1, "Board ID Switch %d", wc->order);
 		else
@@ -1685,6 +1695,7 @@
 			}
 		}
 	}
+	set_span_devicetype(wc);
 }
 
 static void t4_serial_setup(struct t4 *wc, int unit)
@@ -2153,6 +2164,8 @@
 			t4_vpm450_init(wc);
 		wc->dmactrl |= wc->vpm;
 		t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
+		if (wc->vpm)
+			set_span_devicetype(wc);
 	}
 #endif
 	printk(KERN_INFO "Completed startup!\n");

Modified: linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=7039&r1=7038&r2=7039
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wctdm24xxp/base.c Wed Aug 19 11:44:31 2009
@@ -3265,9 +3265,9 @@
 	}
 
 	if (wc->vpm100) {
-		strncat(wc->span.devicetype, " with VPM100M", sizeof(wc->span.devicetype) - 1);
+		strncat(wc->span.devicetype, " (VPM100M)", sizeof(wc->span.devicetype) - 1);
 	} else if (wc->vpmadt032) {
-		strncat(wc->span.devicetype, " with VPMADT032", sizeof(wc->span.devicetype) - 1);
+		strncat(wc->span.devicetype, " (VPMADT032)", sizeof(wc->span.devicetype) - 1);
 	}
 }
 

Modified: linux/branches/2.2/drivers/dahdi/wcte12xp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/branches/2.2/drivers/dahdi/wcte12xp/base.c?view=diff&rev=7039&r1=7038&r2=7039
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wcte12xp/base.c Wed Aug 19 11:44:31 2009
@@ -1191,6 +1191,16 @@
 	vpmadt032_echocan_free(wc->vpmadt032, chan, ec);
 }
 
+static void set_span_devicetype(struct t1 *wc)
+{
+	strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1);
+
+#if defined(VPM_SUPPORT)
+	if (wc->vpmadt032)
+		strncat(wc->span.devicetype, " (VPMADT032)", sizeof(wc->span.devicetype) - 1);
+#endif
+}
+
 static int t1_software_init(struct t1 *wc)
 {
 	int x;
@@ -1216,12 +1226,7 @@
 	sprintf(wc->span.name, "WCT1/%d", num);
 	snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, num);
 	wc->span.manufacturer = "Digium";
-	strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1);
-
-#if defined(VPM_SUPPORT)
-	if (wc->vpmadt032)
-		strncat(wc->span.devicetype, " with VPMADT032", sizeof(wc->span.devicetype) - 1);
-#endif
+	set_span_devicetype(wc);
 
 	snprintf(wc->span.location, sizeof(wc->span.location) - 1,
 		"PCI Bus %02d Slot %02d", dev->bus->number, PCI_SLOT(dev->devfn) + 1);
@@ -1395,6 +1400,7 @@
 
 		config_vpmadt032(wc->vpmadt032);
 
+		set_span_devicetype(wc);
 		module_printk("VPM present and operational (Firmware version %x)\n", wc->vpmadt032->version);
 		wc->ctlreg |= 0x10; /* turn on vpm (RX audio from vpm module) */
 		if (vpmtsisupport) {




More information about the svn-commits mailing list