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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Aug 21 14:28:22 CDT 2013


branch "master" has been updated
       via  ce3f1f26506c27e01aa0e83f93d3c6dd73631025 (commit)
      from  2ad4dc555f220aca8a2fa22eed88bb0f8b94865c (commit)

Summary of changes:
 drivers/dahdi/wcte13xp-base.c |   30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit ce3f1f26506c27e01aa0e83f93d3c6dd73631025
Author: Russ Meyerriecks <rmeyerriecks at digium.com>
Date:   Wed Aug 14 16:49:06 2013 -0500

    wcte13xp: Workaround rare nmi on modprobe on select systems
    
    With certain pci controllers that support pci hotplug, during the reset
    sequence of the fpga, the host controller can get confused about the state of
    the card and throw an nmi.
    
    Known affected systems:
     HP proliant DL160 & DL360p
     Dell poweredge R520
     Super Micro X7SPA-HF
    
    This patch attempts to work around that by removing the fpga reset sequence
    from the driver startup, then setting various control registers to known
    starting state values.
    
    This patch removes the field upgradeable firmware logic temporarily for the
    te133 card to prevent fpga reset.
    
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/wcte13xp-base.c b/drivers/dahdi/wcte13xp-base.c
index efef13e..aee3fdb 100644
--- a/drivers/dahdi/wcte13xp-base.c
+++ b/drivers/dahdi/wcte13xp-base.c
@@ -2839,6 +2839,11 @@ static int t13x_check_firmware(struct t13x *wc)
 	if (force_firmware) {
 		dev_info(&wc->dev->dev,
 			"force_firmware module parameter is set. Forcing firmware load, regardless of version\n");
+	} else if (is_pcie(wc)) {
+		dev_info(&wc->dev->dev,
+			"Firmware %x is running, but we require %x. ERROR: This version of dahdi temporarily disabled field upgradeable firmware. Please upgrade your dahdi revision.\n",
+					version, FIRMWARE_VERSION);
+		return -EIO;
 	} else {
 		dev_info(&wc->dev->dev,
 			"Firmware %x is running, but we require %x\n",
@@ -2903,6 +2908,26 @@ cleanup:
 	return res;
 }
 
+static void soft_reset_fpga(struct t13x *wc)
+{
+	/* digium_gpo */
+	iowrite32be(0x0, wc->membase);
+
+	/* xps_intc */
+	iowrite32be(0x0, wc->membase + 0x300);
+	iowrite32be(0x0, wc->membase + 0x308);
+	iowrite32be(0x0, wc->membase + 0x310);
+	iowrite32be(0x0, wc->membase + 0x31C);
+
+	/* xps_spi_config_flash */
+	iowrite32be(0xA, wc->membase + 0x200);
+
+	/* tdm engine */
+	iowrite32be(0x0, wc->membase + 0x2000);
+	iowrite32be(0x0, wc->membase + 0x2000);
+	iowrite32be(0x0, wc->membase + 0x2000);
+}
+
 static int __devinit te13xp_init_one(struct pci_dev *pdev,
 		const struct pci_device_id *ent)
 {
@@ -2979,10 +3004,7 @@ static int __devinit te13xp_init_one(struct pci_dev *pdev,
 		dev_info(&wc->dev->dev, "Unable to request regions\n");
 
 	/* Reset entire fpga */
-	pci_save_state(pdev);
-	iowrite32be(0xe00, wc->membase + TDM_CONTROL);
-	msleep(2000);
-	pci_restore_state(pdev);
+	soft_reset_fpga(wc);
 
 	/* Enable writes to fpga status register */
 	iowrite32be(0, wc->membase + 0x04);

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


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list