[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Jul 17 15:19:41 CDT 2014


branch "master" has been updated
       via  bce1ecafda9168e0de61628e914cae09e4d8ad46 (commit)
      from  a951dd5e32619d1e8f576f13e3449ee70a76ee70 (commit)

Summary of changes:
 drivers/dahdi/firmware/Makefile |    3 +++
 drivers/dahdi/wcte43x-base.c    |   35 +++++++++++++++++++++++++++++------
 2 files changed, 32 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit bce1ecafda9168e0de61628e914cae09e4d8ad46
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date:   Thu Apr 24 15:11:56 2014 -0500

    wcte43x: Add support for new te436/te236 cards
    
    Adds driver support for Digium's new te436 and te236 quad and dual span T1/E1 cards.
    
    [removed whitespace at end of line]
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>

diff --git a/drivers/dahdi/firmware/Makefile b/drivers/dahdi/firmware/Makefile
index a019bfd..2dca607 100644
--- a/drivers/dahdi/firmware/Makefile
+++ b/drivers/dahdi/firmware/Makefile
@@ -34,6 +34,7 @@ WCT820_VERSION:=1.76
 TE133_VERSION:=780019
 TE134_VERSION:=780017
 TE435_VERSION:=e0019
+TE436_VERSION:=10017
 A8A_VERSION:=1d0017
 A8B_VERSION:=1d0019
 A4A_VERSION:=a0017
@@ -63,6 +64,7 @@ FIRMWARE:=$(FIRMWARE:FIRMWARE-TE820=dahdi-fw-te820-$(WCT820_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-TE133=dahdi-fw-te133-$(TE133_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-TE134=dahdi-fw-te134-$(TE134_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-TE435=dahdi-fw-te435-$(TE435_VERSION).tar.gz)
+FIRMWARE:=$(FIRMWARE:FIRMWARE-TE436=dahdi-fw-te436-$(TE436_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-A8A=dahdi-fw-a8b-$(A8B_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-A8B=dahdi-fw-a8a-$(A8A_VERSION).tar.gz)
 FIRMWARE:=$(FIRMWARE:FIRMWARE-A4A=dahdi-fw-a4b-$(A4B_VERSION).tar.gz)
@@ -138,6 +140,7 @@ hotplug-install: $(DESTDIR)/usr/lib/hotplug/firmware $(DESTDIR)/lib/firmware $(F
 	@$(call RUN_INST,dahdi-fw-te133,$(TE133_VERSION))
 	@$(call RUN_INST,dahdi-fw-te134,$(TE134_VERSION))
 	@$(call RUN_INST,dahdi-fw-te435,$(TE435_VERSION))
+	@$(call RUN_INST,dahdi-fw-te436,$(TE436_VERSION))
 	@$(call RUN_INST,dahdi-fw-a8a,$(A8A_VERSION))
 	@$(call RUN_INST,dahdi-fw-a8b,$(A8B_VERSION))
 	@$(call RUN_INST,dahdi-fw-a4a,$(A4A_VERSION))
diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index aebd1df..c9bc372 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -65,7 +65,9 @@ static inline int delayed_work_pending(struct work_struct *work)
 #endif
 
 static const char *TE435_FW_FILENAME = "dahdi-fw-te435.bin";
+static const char *TE436_FW_FILENAME = "dahdi-fw-te436.bin";
 static const u32 TE435_VERSION = 0xe0019;
+static const u32 TE436_VERSION = 0x10017;
 
 /* #define RPC_RCLK */
 
@@ -794,6 +796,8 @@ struct t43x_desc {
 
 static const struct t43x_desc te435 = {"Wildcard TE435"}; /* pci express quad */
 static const struct t43x_desc te235 = {"Wildcard TE235"}; /* pci express dual */
+static const struct t43x_desc te436 = {"Wildcard TE436"}; /* pci quad */
+static const struct t43x_desc te236 = {"Wildcard TE236"}; /* pci dual */
 
 static int __t43x_pci_get(struct t43x *wc, unsigned int addr)
 {
@@ -3449,12 +3453,6 @@ static int __devinit t43x_init_one(struct pci_dev *pdev,
 		goto fail_exit;
 	}
 
-	/* Check for field updatable firmware */
-	res = wcxb_check_firmware(&wc->xb, TE435_VERSION,
-			TE435_FW_FILENAME, force_firmware, WCXB_RESET_NOW);
-	if (res)
-		goto fail_exit;
-
 	wc->ddev->hardware_id = t43x_read_serial(wc);
 
 	if (wc->ddev->hardware_id == NULL) {
@@ -3464,11 +3462,21 @@ static int __devinit t43x_init_one(struct pci_dev *pdev,
 	}
 
 	if (strncmp(wc->ddev->hardware_id, "1TE435F", 7) == 0) {
+		/* Quad-span PCIE */
 		wc->numspans = 4;
 		wc->devtype = &te435;
 	} else if (strncmp(wc->ddev->hardware_id, "1TE235F", 7) == 0) {
+		/* Dual-span PCIE */
 		wc->numspans = 2;
 		wc->devtype = &te235;
+	} else if (strncmp(wc->ddev->hardware_id, "1TE436F", 7) == 0) {
+		/* Quad-span PCI */
+		wc->numspans = 4;
+		wc->devtype = &te436;
+	} else if (strncmp(wc->ddev->hardware_id, "1TE236F", 7) == 0) {
+		/* Dual-span PCI */
+		wc->numspans = 2;
+		wc->devtype = &te236;
 	} else {
 		dev_info(&wc->xb.pdev->dev,
 			"Unable to identify board type from serial number %s\n",
@@ -3477,6 +3485,20 @@ static int __devinit t43x_init_one(struct pci_dev *pdev,
 		goto fail_exit;
 	}
 
+	/* Check for field updatable firmware */
+	if ((wc->devtype == &te435) || (wc->devtype == &te235)) {
+		res = wcxb_check_firmware(&wc->xb, TE435_VERSION,
+			TE435_FW_FILENAME, force_firmware, WCXB_RESET_NOW);
+	} else if ((wc->devtype == &te436) || (wc->devtype == &te236)) {
+		res = wcxb_check_firmware(&wc->xb, TE436_VERSION,
+			TE436_FW_FILENAME, force_firmware, WCXB_RESET_NOW);
+	} else {
+		res = -EIO;
+	}
+
+	if (res)
+		goto fail_exit;
+
 	for (x = 0; x < wc->numspans; x++) {
 		ts = kzalloc(sizeof(*wc->tspans[x]), GFP_KERNEL);
 		if (!ts) {
@@ -3595,6 +3617,7 @@ static void __devexit t43x_remove_one(struct pci_dev *pdev)
 
 static DEFINE_PCI_DEVICE_TABLE(t43x_pci_tbl) = {
 	{ 0xd161, 0x800e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{ 0xd161, 0x8013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ 0 }
 };
 

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list