Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dmaengine-fixes-3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine

Pull dmaengine fixes from Dan Williams:
"Two fixes for -stable:

- async_mult() sometimes maps less buffers than initially requested.
We end up freeing dmaengine_unmap_data on an invalid pool.

- mv_xor: register write ordering fix"

* tag 'dmaengine-fixes-3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
dmaengine: fix dmaengine_unmap failure
dma: mv_xor: Flush descriptors before activating a channel

+6 -5
+2
drivers/dma/dmaengine.c
··· 1009 1009 dma_unmap_page(dev, unmap->addr[i], unmap->len, 1010 1010 DMA_BIDIRECTIONAL); 1011 1011 } 1012 + cnt = unmap->map_cnt; 1012 1013 mempool_free(unmap, __get_unmap_pool(cnt)->pool); 1013 1014 } 1014 1015 ··· 1075 1074 memset(unmap, 0, sizeof(*unmap)); 1076 1075 kref_init(&unmap->kref); 1077 1076 unmap->dev = dev; 1077 + unmap->map_cnt = nr; 1078 1078 1079 1079 return unmap; 1080 1080 }
+3 -5
drivers/dma/mv_xor.c
··· 191 191 192 192 static void mv_chan_activate(struct mv_xor_chan *chan) 193 193 { 194 - u32 activation; 195 - 196 194 dev_dbg(mv_chan_to_devp(chan), " activate chan.\n"); 197 - activation = readl_relaxed(XOR_ACTIVATION(chan)); 198 - activation |= 0x1; 199 - writel_relaxed(activation, XOR_ACTIVATION(chan)); 195 + 196 + /* writel ensures all descriptors are flushed before activation */ 197 + writel(BIT(0), XOR_ACTIVATION(chan)); 200 198 } 201 199 202 200 static char mv_chan_is_busy(struct mv_xor_chan *chan)
+1
include/linux/dmaengine.h
··· 429 429 typedef void (*dma_async_tx_callback)(void *dma_async_param); 430 430 431 431 struct dmaengine_unmap_data { 432 + u8 map_cnt; 432 433 u8 to_cnt; 433 434 u8 from_cnt; 434 435 u8 bidi_cnt;