[dahdi-commits] sruffell: linux/trunk r6768 - /linux/trunk/drivers/dahdi/wct4xxp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Jun 26 12:07:42 CDT 2009
Author: sruffell
Date: Fri Jun 26 12:07:39 2009
New Revision: 6768
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6768
Log:
wct4xxp: Unmap the same size DMA window that was mapped.
Modified:
linux/trunk/drivers/dahdi/wct4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=6768&r1=6767&r2=6768
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Fri Jun 26 12:07:39 2009
@@ -3807,6 +3807,7 @@
{
struct t4 *wc = pci_get_drvdata(pdev);
struct dahdi_span *span;
+ int basesize;
int i;
if (!wc) {
@@ -3822,6 +3823,10 @@
wc->vpm450m = NULL;
/* Unregister spans */
+ basesize = DAHDI_MAX_CHUNKSIZE * 32 * 4;
+ if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN))
+ basesize = basesize * 2;
+
for (i = 0; i < wc->numspans; ++i) {
span = &wc->tspans[i]->span;
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &span->flags))
@@ -3842,7 +3847,9 @@
pci_release_regions(pdev);
/* Immediately free resources */
- pci_free_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 32 * 4, (void *)wc->writechunk, wc->writedma);
+
+ pci_free_consistent(pdev, basesize * 2,
+ (void *)wc->writechunk, wc->writedma);
order_index[wc->order]--;
More information about the dahdi-commits
mailing list