[svn-commits] fjoe: freebsd/trunk r8335 - /freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Mar 13 05:35:57 CST 2010
Author: fjoe
Date: Sat Mar 13 05:35:53 2010
New Revision: 8335
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8335
Log:
- voicebus_map(): map only vbb->data, not the whole vbb
- voicebus_release(): destroy spinlock in the very end: this fixes
lockup on driver unload
- add DPRINTF() macro
Modified:
freebsd/trunk/drivers/dahdi/voicebus/voicebus.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=8335&r1=8334&r2=8335
==============================================================================
--- freebsd/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ freebsd/trunk/drivers/dahdi/voicebus/voicebus.c Sat Mar 13 05:35:53 2010
@@ -42,6 +42,8 @@
#include <dev/pci/pcivar.h>
#include <machine/resource.h>
+
+#define DPRINTF(dev, fmt, args...) device_rlprintf(20, *dev, fmt, ##args)
#else /* !__FreeBSD__ */
#include <linux/version.h>
#include <linux/slab.h>
@@ -210,7 +212,7 @@
{
int res;
- res = bus_dmamap_load(vbb_dma_tag, vbb->dma_map, vbb, sizeof(*vbb),
+ res = bus_dmamap_load(vbb_dma_tag, vbb->dma_map, vbb->data, sizeof(vbb->data),
vb_dma_map_addr, &vbb->paddr, 0);
if (res) {
if (printk_ratelimit())
@@ -1320,10 +1322,10 @@
#endif
/* Cleanup memory and software resources. */
+ vb_free_descriptors(vb, &vb->txd);
+ vb_free_descriptors(vb, &vb->rxd);
destroy_completion(&vb->stopped_completion);
spin_lock_destroy(&vb->lock);
- vb_free_descriptors(vb, &vb->txd);
- vb_free_descriptors(vb, &vb->rxd);
if (vb->idle_vbb_dma_addr) {
#if defined(__FreeBSD__)
vb_dma_free(&vb->idle_vbb_dma_tag, &vb->idle_vbb_dma_map,
More information about the svn-commits
mailing list