Skip to contentSkip to conversation

firewire: core: fix DMA unmapping in iso buffer removal

PATCH New Stefan Richter 1 participant 1 message Jun 14, 2009 Firewire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firewire: core: fix DMA unmapping in iso buffer removal

dmap_unmap_page() shall use the same direction as dma_map_page().

---
 drivers/firewire/core-iso.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firewire/core-iso.c +2 -2
Index: linux/drivers/firewire/core-iso.c
===================================================================
@@ -71,7 +71,7 @@ int fw_iso_buffer_init(struct fw_iso_buf
 	for (j = 0; j < i; j++) {
 		address = page_private(buffer->pages[j]);
 		dma_unmap_page(card->device, address,
-			       PAGE_SIZE, DMA_TO_DEVICE);
+			       PAGE_SIZE, direction);
 		__free_page(buffer->pages[j]);
 	}
 	kfree(buffer->pages);
@@ -108,7 +108,7 @@ void fw_iso_buffer_destroy(struct fw_iso
 	for (i = 0; i < buffer->page_count; i++) {
 		address = page_private(buffer->pages[i]);
 		dma_unmap_page(card->device, address,
-			       PAGE_SIZE, DMA_TO_DEVICE);
+			       PAGE_SIZE, buffer->direction);
 		__free_page(buffer->pages[i]);
 	}
 
Signature · 3 lines
Stefan Richter
-=====-==--= -==- -====
http://arcgraph.de/sr/