[svn-commits] fjoe: freebsd/trunk r9177 - in /freebsd/trunk/drivers/dahdi: voicebus/ wctc4xxp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 23 01:06:34 CDT 2010


Author: fjoe
Date: Mon Aug 23 01:06:30 2010
New Revision: 9177

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9177
Log:
- Add wmb() definition
- Sync DMA map after SET_OWNED.

Modified:
    freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
    freebsd/trunk/drivers/dahdi/wctc4xxp/base.c

Modified: freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9177&r1=9176&r2=9177
==============================================================================
--- freebsd/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ freebsd/trunk/drivers/dahdi/voicebus/voicebus.c Mon Aug 23 01:06:30 2010
@@ -41,6 +41,11 @@
 #include <dev/pci/pcivar.h>
 
 #include <machine/resource.h>
+
+#ifdef wmb
+#undef wmb
+#define wmb()
+#endif
 #else /* !__FreeBSD__ */
 #include <linux/version.h>
 #include <linux/slab.h>

Modified: freebsd/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=9177&r1=9176&r2=9177
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wctc4xxp/base.c Mon Aug 23 01:06:30 2010
@@ -32,6 +32,11 @@
 #include <machine/resource.h>
 #include <net/ethernet.h>
 #include <vm/uma.h>
+
+#ifdef wmb
+#undef wmb
+#define wmb()
+#endif
 #else /* !__FreeBSD__ */
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -1194,7 +1199,6 @@
 	    dahdi_dma_map_addr, __DEVOLATILE(void *, &d->buffer1), 0);
 	if (res)
 		return -res;
-	bus_dmamap_sync(dr->dma_tag, dr->dma_map, BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(dr->tcb_dma_tag, dr->tcb_dma_map[dr->tail], BUS_DMASYNC_PREWRITE);
 #else
 	d->buffer1 = pci_map_single(dr->pdev, c->data,
@@ -1202,6 +1206,9 @@
 #endif
 
 	SET_OWNED(d); /* That's it until the hardware is done with it. */
+#if defined(__FreeBSD__)
+	bus_dmamap_sync(dr->dma_tag, dr->dma_map, BUS_DMASYNC_PREWRITE);
+#endif
 	dr->pending[dr->tail] = c;
 	dr->tail = (dr->tail + 1) & DRING_MASK;
 	++dr->count;




More information about the svn-commits mailing list