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-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
"Late fixes for 4.4 are three fixes for drivers which include a revert
of mic-x100 fix which is causing regression, xgene fix for double IRQ
and async_tx fix to use GFP_NOWAIT"

* tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
async_tx: use GFP_NOWAIT rather than GFP_IO
dmaengine: Revert "dmaengine: mic_x100: add missing spin_unlock"

+16 -17
+1 -1
crypto/async_tx/async_memcpy.c
··· 53 53 struct dmaengine_unmap_data *unmap = NULL; 54 54 55 55 if (device) 56 - unmap = dmaengine_get_unmap_data(device->dev, 2, GFP_NOIO); 56 + unmap = dmaengine_get_unmap_data(device->dev, 2, GFP_NOWAIT); 57 57 58 58 if (unmap && is_dma_copy_aligned(device, src_offset, dest_offset, len)) { 59 59 unsigned long dma_prep_flags = 0;
+2 -2
crypto/async_tx/async_pq.c
··· 188 188 BUG_ON(disks > 255 || !(P(blocks, disks) || Q(blocks, disks))); 189 189 190 190 if (device) 191 - unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOIO); 191 + unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOWAIT); 192 192 193 193 /* XORing P/Q is only implemented in software */ 194 194 if (unmap && !(submit->flags & ASYNC_TX_PQ_XOR_DST) && ··· 307 307 BUG_ON(disks < 4); 308 308 309 309 if (device) 310 - unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOIO); 310 + unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOWAIT); 311 311 312 312 if (unmap && disks <= dma_maxpq(device, 0) && 313 313 is_dma_pq_aligned(device, offset, 0, len)) {
+2 -2
crypto/async_tx/async_raid6_recov.c
··· 41 41 u8 *a, *b, *c; 42 42 43 43 if (dma) 44 - unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOIO); 44 + unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOWAIT); 45 45 46 46 if (unmap) { 47 47 struct device *dev = dma->dev; ··· 105 105 u8 *d, *s; 106 106 107 107 if (dma) 108 - unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOIO); 108 + unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOWAIT); 109 109 110 110 if (unmap) { 111 111 dma_addr_t dma_dest[2];
+2 -2
crypto/async_tx/async_xor.c
··· 182 182 BUG_ON(src_cnt <= 1); 183 183 184 184 if (device) 185 - unmap = dmaengine_get_unmap_data(device->dev, src_cnt+1, GFP_NOIO); 185 + unmap = dmaengine_get_unmap_data(device->dev, src_cnt+1, GFP_NOWAIT); 186 186 187 187 if (unmap && is_dma_xor_aligned(device, offset, 0, len)) { 188 188 struct dma_async_tx_descriptor *tx; ··· 278 278 BUG_ON(src_cnt <= 1); 279 279 280 280 if (device) 281 - unmap = dmaengine_get_unmap_data(device->dev, src_cnt, GFP_NOIO); 281 + unmap = dmaengine_get_unmap_data(device->dev, src_cnt, GFP_NOWAIT); 282 282 283 283 if (unmap && src_cnt <= device->max_xor && 284 284 is_dma_xor_aligned(device, offset, 0, len)) {
+5 -10
drivers/dma/mic_x100_dma.c
··· 317 317 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); 318 318 struct device *dev = mic_dma_ch_to_device(mic_ch); 319 319 int result; 320 - struct dma_async_tx_descriptor *tx = NULL; 321 320 322 321 if (!len && !flags) 323 322 return NULL; ··· 324 325 spin_lock(&mic_ch->prep_lock); 325 326 result = mic_dma_do_dma(mic_ch, flags, dma_src, dma_dest, len); 326 327 if (result >= 0) 327 - tx = allocate_tx(mic_ch); 328 - 329 - if (!tx) 330 - dev_err(dev, "Error enqueueing dma, error=%d\n", result); 331 - 328 + return allocate_tx(mic_ch); 329 + dev_err(dev, "Error enqueueing dma, error=%d\n", result); 332 330 spin_unlock(&mic_ch->prep_lock); 333 - return tx; 331 + return NULL; 334 332 } 335 333 336 334 static struct dma_async_tx_descriptor * ··· 335 339 { 336 340 struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); 337 341 int ret; 338 - struct dma_async_tx_descriptor *tx = NULL; 339 342 340 343 spin_lock(&mic_ch->prep_lock); 341 344 ret = mic_dma_do_dma(mic_ch, flags, 0, 0, 0); 342 345 if (!ret) 343 - tx = allocate_tx(mic_ch); 346 + return allocate_tx(mic_ch); 344 347 spin_unlock(&mic_ch->prep_lock); 345 - return tx; 348 + return NULL; 346 349 } 347 350 348 351 /* Return the status of the transaction */
+4
drivers/dma/xgene-dma.c
··· 29 29 #include <linux/dmapool.h> 30 30 #include <linux/interrupt.h> 31 31 #include <linux/io.h> 32 + #include <linux/irq.h> 32 33 #include <linux/module.h> 33 34 #include <linux/of_device.h> 34 35 ··· 1611 1610 /* Register DMA channel rx irq */ 1612 1611 for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) { 1613 1612 chan = &pdma->chan[i]; 1613 + irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY); 1614 1614 ret = devm_request_irq(chan->dev, chan->rx_irq, 1615 1615 xgene_dma_chan_ring_isr, 1616 1616 0, chan->name, chan); ··· 1622 1620 1623 1621 for (j = 0; j < i; j++) { 1624 1622 chan = &pdma->chan[i]; 1623 + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY); 1625 1624 devm_free_irq(chan->dev, chan->rx_irq, chan); 1626 1625 } 1627 1626 ··· 1643 1640 1644 1641 for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) { 1645 1642 chan = &pdma->chan[i]; 1643 + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY); 1646 1644 devm_free_irq(chan->dev, chan->rx_irq, chan); 1647 1645 } 1648 1646 }