On Wed, Dec 22, 2010 at 12:19:09PM +0100, Mian Yousaf Kaukab wrote:
On 12/22/2010 09:50 AM, Felipe Balbi wrote:
+ int (*is_req_compatible)(struct dma_controller *,
+ struct musb_ep *, struct usb_request *);
you really don't need this. It's enough to do all checks in
rxstate()/txstate() before mapping the request
Mappings (dma_map_single, dma_sync_single_for_device) are currently done
in musb_gadget_queue(). Are you suggesting to move them to
rxstate()/txstate()?
Not needed... Forget that point :-p
The draw back I see to move them is that mapping operations will be
serialized
with any existing requests, where as in musb_gadget_queue() mappings still
can be done in parallel. Same reason they should not be moved to
->channel_program()
call itself.
With this patch dma can indicate in musb_gadget_queue() that there is
no need to map the
request I will not handle it in rxstate()/txstate().
Then you kill the possibility of using e.g. a bounce buffer to still
send the data via DMA.
and if you have to
fallback to pio (due to e.g. short packet) just go ahead and unmap the
buffer. No weird checks needed:-)
OK, thats minimum what I need.
Then do just that, when you're falling back to PIO, just unmap the
buffer.
--
balbi
--
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