Skip to content

Commit 29ad14c

Browse files
author
Stefan Richter
committed
firewire: core: fix DMA unmapping in iso buffer removal
dmap_unmap_page() shall use the same direction as dma_map_page(). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 parent 1337f85 commit 29ad14c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/firewire/core-iso.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
7171
for (j = 0; j < i; j++) {
7272
address = page_private(buffer->pages[j]);
7373
dma_unmap_page(card->device, address,
74-
PAGE_SIZE, DMA_TO_DEVICE);
74+
PAGE_SIZE, direction);
7575
__free_page(buffer->pages[j]);
7676
}
7777
kfree(buffer->pages);
@@ -108,7 +108,7 @@ void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer,
108108
for (i = 0; i < buffer->page_count; i++) {
109109
address = page_private(buffer->pages[i]);
110110
dma_unmap_page(card->device, address,
111-
PAGE_SIZE, DMA_TO_DEVICE);
111+
PAGE_SIZE, buffer->direction);
112112
__free_page(buffer->pages[i]);
113113
}
114114

0 commit comments

Comments
 (0)