Re: [PATCH] usb: dwc3: gadget: fix up DMA direction

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

 



On Tue, 20 Dec 2011, Felipe Balbi wrote:

> If we're using an IN endpoint, the DMA direction
> is DMA_FROM_DEVICE, rather than DMA_TO_DEVICE.

Are you sure you haven't got this backward?

For DMA operations, the device is the thing doing the direct memory
access -- in this case, the UDC controller.  With IN endpoints, data
goes from the gadget's memory, though the UDC controller, and over the
USB bus to the host.  That is _from_ memory _to_ UDC; hence the
direction is DMA_TO_DEVICE.

Alan Stern

--
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