On Thu, Feb 15, 2018 at 10:56 AM, Ran Shalit <[email protected]> wrote:
> On Mon, Feb 12, 2018 at 2:39 PM, Oliver Neukum <[email protected]> wrote:
>> Am Sonntag, den 11.02.2018, 22:17 +0200 schrieb Ran Shalit:
>>> On Tue, Feb 6, 2018 at 8:55 AM, Felipe Balbi
>>> <[email protected]> wrote:
>>> >
>>> >
>>> > Hi,
>>> >
>>> > Ran Shalit <[email protected]> writes:
>>> > >
>>> > > Hello,
>>> > >
>>> > > I check code in:
>>> > > https://elixir.free-electrons.com/linux/v3.3/source/drivers/usb/gadget/f_mass_storage.c
>>> > > but I see no API usage of DMA, yet it is being mentioned as if it is 
>>> > > used.
>>> >
>>> > but it is used. It's just managed by the UDC driver (dwc3, musb,
>>> > chipidea, Renesas, etc)
>>> >
>>> Just to be sure,
>>> can I assume that other usb gadget drivers are using DMA (including
>>> gadgetfs for userspace driver) ?
>>> And it is also correct for host drivers  (such as camera device ) ?
>>
>> None of these drivers are for hardware. They implement a protocol.
>> On the host as well as on the gadget side there are driver for the
>> actual host controllers (EHCI, XHCI, ...) as well as their gadget
>> equivalents.
>>
>> Any of these drivers may or may not use DMA. Neither the assumption
>> that they use DMA or the assumption that they do not use DMA
>> is valid. In fact they may mix it.
>
Hi,

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 ?

Sorry for the previous disrupted email, it was sent by mistake.
Thanks a lot,
Ran

that there is API for dma
>
>> Your code must be ready to cope with either usage.
>>
>>         HTH
>>                 Oliver
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to