[svn-commits] fjoe: freebsd/trunk r8318 - /freebsd/trunk/drivers/dahdi/wct4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 9 23:02:10 CST 2010


Author: fjoe
Date: Tue Mar  9 23:02:06 2010
New Revision: 8318

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8318
Log:
Protect bus_dmamap_sync invocations with #ifdef __FreeBSD__

Modified:
    freebsd/trunk/drivers/dahdi/wct4xxp/base.c

Modified: freebsd/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=8318&r1=8317&r2=8318
==============================================================================
--- freebsd/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wct4xxp/base.c Tue Mar  9 23:02:06 2010
@@ -2556,7 +2556,9 @@
 		if (debug & DEBUG_MAIN)
 			printk(KERN_DEBUG "TE%dXXP: Double/missed interrupt detected\n", wc->numspans);
 	}
+#if defined(__FreeBSD__)
 	bus_dmamap_sync(wc->read_dma_tag, wc->read_dma_map, BUS_DMASYNC_POSTREAD);
+#endif
 	for (x=0;x<DAHDI_CHUNKSIZE;x++) {
 		for (z=0;z<24;z++) {
 			/* All T1/E1 channels */
@@ -2668,11 +2670,15 @@
 {
 	struct t4_span *ts = data;
 	struct t4 *wc = ts->owner;
-	
+
+#if defined(__FreeBSD__)
 	bus_dmamap_sync(wc->read_dma_tag, wc->read_dma_map, BUS_DMASYNC_POSTREAD);
+#endif
 	__receive_span(ts);
 	__transmit_span(ts);
+#if defined(__FreeBSD__)
 	bus_dmamap_sync(wc->write_dma_tag, wc->write_dma_map, BUS_DMASYNC_PREWRITE);
+#endif
 	atomic_dec(&wc->worklist);
 	if (!atomic_read(&wc->worklist))
 		t4_pci_out(wc, WC_INTR, 0);
@@ -2683,10 +2689,14 @@
 	int x;
 	for (x=0;x<wc->numspans;x++) {
 		if (wc->tspans[x]->span.flags & DAHDI_FLAG_RUNNING) {
+#if defined(__FreeBSD__)
 			bus_dmamap_sync(wc->read_dma_tag, wc->read_dma_map, BUS_DMASYNC_POSTREAD);
+#endif
 			__receive_span(wc->tspans[x]);
 			__transmit_span(wc->tspans[x]);
+#if defined(__FreeBSD__)
 			bus_dmamap_sync(wc->write_dma_tag, wc->write_dma_map, BUS_DMASYNC_PREWRITE);
+#endif
 		}
 	}
 }
@@ -2742,7 +2752,9 @@
 		/* Advance pointer by 4 TDM frame lengths */
 		writechunk += 32;
 	}
+#if defined(__FreeBSD__)
 	bus_dmamap_sync(wc->write_dma_tag, wc->write_dma_map, BUS_DMASYNC_PREWRITE);
+#endif
 }
 #endif
 




More information about the svn-commits mailing list