[svn-commits] fjoe: freebsd/trunk r9197 - /freebsd/trunk/drivers/dahdi/wcfxo.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 25 12:27:48 CDT 2010


Author: fjoe
Date: Wed Aug 25 12:27:46 2010
New Revision: 9197

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9197
Log:
dahdi_device_attach(): sync initialization sequence with Linux, so that
necessary structures are initialized before interrupts are configured.

Modified:
    freebsd/trunk/drivers/dahdi/wcfxo.c

Modified: freebsd/trunk/drivers/dahdi/wcfxo.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=9197&r1=9196&r2=9197
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcfxo.c (original)
+++ freebsd/trunk/drivers/dahdi/wcfxo.c Wed Aug 25 12:27:46 2010
@@ -1237,13 +1237,6 @@
 		return (ENXIO);
 	}
 
-	/* enable bus mastering */
-	pci_enable_busmaster(dev);
-
-	res = wcfxo_setup_intr(wc);
-	if (res)
-		goto err;
-
 	/* allocate enough memory for two zt chunks.  Each sample uses
 	   32 bits.  Allocate an extra set just for control too */
 	res = dahdi_dma_allocate(wc->dev->dev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 4, &wc->write_dma_tag, &wc->write_dma_map,
@@ -1261,6 +1254,13 @@
 		goto err;
 	}
 
+	/* enable bus mastering */
+	pci_enable_busmaster(dev);
+
+	res = wcfxo_setup_intr(wc);
+	if (res)
+		goto err;
+
 	wcfxo_hardware_init(wc);
 
 	/* enable interrupts */




More information about the svn-commits mailing list