* Felipe Balbi | 2011-12-20 18:37:04 [+0200]: >Hi all, Hi, >here's v2 of the generic dma mapping API for the gadget framework. > >I have applied a few comments from Alan and Sebastian, but I'm >still not convinced we need that req->mapped private flag. If >it's a real problem that many different controllers will have, >then we should have a generic "mapped" flag on the public >usb_request structure. We have four categories of drivers: - drivers which don't care about dma all. - drivers having theid own copy of dma and mapped (renesas_usbhs) - drivers which know what they do and map/unmap the memory before/after transfer (r8a66597) - and, the bigger pool: driver which are doing the mapping dance According to my counting 14 out of 30 support dma transfers. So. Those 14 drivers need to map/unmap memory no matter what. This has do be done in enqueue and un-done de-queue/complete. It is not gadget's business to look at the dma field. Therefore, if the UDC supports DMA transfers, it calls the generic map function. So it is always mapped. And then, once everything is done the very same driver knows that it has to call unmap again. >Please take a look at the revised version and apologies if >I have missed any comment, but it has been a hectic week >already ;-) 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