Re: Q: Does mass storage gadget use DMA ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 26, 2018 at 5:59 PM, Oliver Neukum <oneukum@xxxxxxxx> wrote:
> Am Donnerstag, den 15.02.2018, 11:00 +0200 schrieb Ran Shalit:
>> I actually asked about DMA, because I see that it is possible to send
>> urb using DMA allocated buffers or not (coherent and non-coherent)
>> usb_buffer_alloc().
>> So, How can we actually know if I should use this API with a device or
>> not ? I mean, is it always possible to use the coherent buffer with
>> the device ?
>
> Hi,
>
> it is always possible to use usb_alloc_coherent() on a host.
> But it is generally not sensible. It is for buffers to be reused
> many times. In general use kmalloc() [once per buffer. That is a rule.
> You must not share them.]
>
>         HTH
>                 Oliver
>
Hi Oliver,

Is the dma engine which is responsible for the transaction is actually
in the usb device (It's not dma controller in host) ?

If I understand correctly in both ways (kmalloc or
usb_alloc_coherent), then we are allocating buffers might be used for
dma.
Even if DMA is not used in the transaction, than is shall still be
functional with the same DMA-allocated buffers.

Thanks,
ranran
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux