Re: [RFC] usb: musb: allow dma engine to check compatibility with usb request

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

 



Hi,

On Wed, Dec 22, 2010 at 12:59:11PM +0100, Mian Yousaf Kaukab wrote:
On 12/22/2010 12:43 PM, Felipe Balbi wrote:
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.
DMA engine can choose not to implement ->is_req_compatible() call if they know they can make DMA work.

Hmm, ok then. But let's make it somehow like below:

. introduce the new function pointer to dma_controller structure

. introduce a function called musb_dma_map_request()
	- that will ask if DMA can handle request and return early if it
	  can't.
	- otherwise it will map the request

. introduce also musb_dma_unmap_request()
	- that will check if request is mapped and return early if it
	  isn't.
	- otherwise it will unmap the request

In musb_dma_map_request() you can call your new function pointer.

Then you have splitted all check/map/unmap logic to only one location
and everybody just makes call to those. Does that sound ok ? It would be
two patches, instead of one.

BTW, check your initial patch as there are a few typos in comments.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux