* Alan Stern | 2011-12-20 10:54:41 [-0500]: >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. The spec says: DMA_TO_DEVICE data is going from the memory to the device DMA_FROM_DEVICE data is coming from the device to the memory So for IN endpoint we need DMA_TO_DEVICE because it goes from memory to device. Thanks Alan. >Alan Stern > Sebastian -- 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