[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJd=RBB2LPeqQ0Fg+NHQdSzPPR8Fg_PbquuOtp1RFt3xtRmjow@mail.gmail.com>
Date: Sat, 13 Aug 2011 12:16:43 +0800
From: Hillf Danton <dhillf@...il.com>
To: "Koul, Vinod" <vinod.koul@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [RFC patch resend] DMA engine/Langwell: release LLI pool
When releasing resources allocated before for DMA channel, checking LLI pool
is added and it is reclaimed if necessary.
Signed-off-by: Hillf Danton <dhillf@...il.com>
---
--- a/drivers/dma/intel_mid_dma.c Sat Aug 13 11:44:46 2011
+++ intel_mid_dma.c Sat Aug 13 12:21:41 2011
@@ -833,6 +833,11 @@ static void intel_mid_dma_free_chan_reso
midc->descs_allocated = 0;
list_for_each_entry_safe(desc, _desc, &midc->active_list, desc_node) {
list_del(&desc->desc_node);
+ if (desc->lli != NULL) {
+ pci_pool_free(desc->lli_pool, desc->lli,
+ desc->lli_phys);
+ pci_pool_destroy(desc->lli_pool);
+ }
pci_pool_free(mid->dma_pool, desc, desc->txd.phys);
}
list_for_each_entry_safe(desc, _desc, &midc->free_list, desc_node) {
@@ -841,6 +846,11 @@ static void intel_mid_dma_free_chan_reso
}
list_for_each_entry_safe(desc, _desc, &midc->queue, desc_node) {
list_del(&desc->desc_node);
+ if (desc->lli != NULL) {
+ pci_pool_free(desc->lli_pool, desc->lli,
+ desc->lli_phys);
+ pci_pool_destroy(desc->lli_pool);
+ }
pci_pool_free(mid->dma_pool, desc, desc->txd.phys);
}
spin_unlock_bh(&midc->lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists