lkml.org 
[lkml]   [2014]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 0/4] staging: comedi: addi_apci_3120: redo DMA buffer allocation
Date
On Friday, September 12, 2014 4:20 AM, Ian Abbott wrote:
> "addi_apci_3120" allocates more pages of DMA buffer than it uses, may
> allocate half a double-buffer it does not use because it's the "wrong"
> half that it managed to allocate (unlikely), and relies on virt_to_bus()
> to treat generic kernel memory from get_free_pages() as coherent DMA
> memory. Correct the issues, using dma_alloc_coherent() to allocate the
> DMA buffers.
>
> 1) staging: comedi: addi_apci_3120: don't allocate 2nd DMA buffer on failure
> 2) staging: comedi: addi_apci_3120: don't overallocate DMA buffer
> 3) staging: comedi: addi_apci_3120: use dma_alloc_coherent()
> 4) staging: comedi: addi_apci_3120: simplify setting of devpriv->us_UseDma
>
> drivers/staging/comedi/Kconfig | 2 +-
> .../staging/comedi/drivers/addi-data/addi_common.h | 3 +-
> drivers/staging/comedi/drivers/addi_apci_3120.c | 44 ++++++++++------------
> 3 files changed, 22 insertions(+), 27 deletions(-)

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>



\
 
 \ /
  Last update: 2014-09-15 20:21    [W:0.083 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site