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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 24 13:19:11 CST 2010


Author: sruffell
Date: Wed Feb 24 13:19:07 2010
New Revision: 8086

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8086
Log:
Merged revisions 8080 via svnmerge from 
https://origsvn.digium.com/svn/dahdi/linux/trunk

........
  r8080 | sruffell | 2010-02-24 13:13:05 -0600 (Wed, 24 Feb 2010) | 4 lines
  
  wctdm24xxp, wcte12xp:  Abort attach if interface fails to come out of reset.
  
  If the reset bit never clears, then just assume we cannot talk to the board and
  error on the attach.  DAHDI-515.
........

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

Propchange: linux/branches/2.2/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=8086&r1=8085&r2=8086
==============================================================================
--- linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/branches/2.2/drivers/dahdi/voicebus/voicebus.c Wed Feb 24 13:19:07 2010
@@ -738,8 +738,8 @@
 	} while ((reg & 0x00000001) && time_before(jiffies, timeout));
 
 	if (reg & 0x00000001) {
-		dev_warn(&vb->pdev->dev, "Hardware did not come out of reset "
-			 "within 100ms!");
+		dev_warn(&vb->pdev->dev, "Did not come out of reset "
+			 "within 100ms\n");
 		return -EIO;
 	}
 
@@ -1801,14 +1801,6 @@
 	vb->idle_vbb = dma_alloc_coherent(&vb->pdev->dev, vb->framesize,
 					  &vb->idle_vbb_dma_addr, GFP_KERNEL);
 
-	retval = vb_initialize_tx_descriptors(vb);
-	if (retval)
-		goto cleanup;
-
-	retval = vb_initialize_rx_descriptors(vb);
-	if (retval)
-		goto cleanup;
-
 	/* ----------------------------------------------------------------
 	   Configure the hardware interface.
 	   ---------------------------------------------------------------- */
@@ -1821,6 +1813,20 @@
 	pci_set_master(pdev);
 	vb_enable_io_access(vb);
 
+	if (vb_reset_interface(vb)) {
+		retval = -EIO;
+		dev_warn(&vb->pdev->dev, "Failed reset.\n");
+		goto cleanup;
+	}
+
+	retval = vb_initialize_tx_descriptors(vb);
+	if (retval)
+		goto cleanup;
+
+	retval = vb_initialize_rx_descriptors(vb);
+	if (retval)
+		goto cleanup;
+
 #if VOICEBUS_DEFERRED != TIMER
 	retval = request_irq(pdev->irq, vb_isr, DAHDI_IRQ_SHARED,
 			     board_name, vb);
@@ -1865,7 +1871,8 @@
 		pci_disable_device(vb->pdev);
 
 	kfree(vb);
-	WARN_ON(0 == retval);
+	if (0 == retval)
+		retval = -EIO;
 	return retval;
 }
 EXPORT_SYMBOL(voicebus_init);

Modified: linux/branches/2.2/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8086&r1=8085&r2=8086
==============================================================================
--- linux/branches/2.2/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/branches/2.2/drivers/dahdi/wcte12xp/base.c Wed Feb 24 13:19:07 2010
@@ -1807,7 +1807,6 @@
 	if ((res = voicebus_init(pdev, SFRAME_SIZE, wc->name,
 				 t1_handle_receive, t1_handle_transmit, wc,
 				 debug, &wc->vb))) {
-		WARN_ON(1);
 		free_wc(wc);
 		ifaces[index] = NULL;
 		return res;




More information about the svn-commits mailing list