Re: [PATCH] serial: sh-sci: don't filter on DMA device, use onlychannel ID
From: Koul, Vinod
Date: Wed Sep 07 2011 - 17:38:07 EST
On Wed, 2011-09-07 at 22:01 +0200, Guennadi Liakhovetski wrote:
> On Thu, 8 Sep 2011, Koul, Vinod wrote:
> You're seriously suggesting to export and use an additional shdma private
> function, bypassing the dmaengine API?... That really doesn't sound like a
> good idea to me, sorry. How about using .device_control(DMA_SLAVE_CONFIG)
> from the filter function directly to verify channel suitability?
Yes see stedma40, coh90138 drivers
.device_control is not right place as channel is already allocated.
You are basically moving filter fn from all clients to dmac driver.
>
> > I cant agree to the whole point of filtering in alloc
> >
> > One channel is allocated, we should _not_ do any further filtering
>
> Sorry, I do not understand this argumentation. Filtering and resource
> allocation are parts of the channel-acquisition process, either of them
> can fail, in which case the channel remains free for future requests.
DMA drivers set caps for each channel
Client requests a channel and dmaengine matches channel based on caps
and filer function is called so that additional filtering can take
place.
And .alloc_chan_resources is supposed to allocate the channel resource
and not do anything else.
--
~Vinod
èº{.nÇ+·®+%Ëlzwm
ébëæìr¸zX§»®w¥{ayºÊÚë,j¢f£¢·hàz¹®w¥¢¸¢·¦j:+v¨wèjØm¶ÿ¾«êçzZ+ùÝj"ú!¶iOæ¬z·vØ^¶m§ÿðÃnÆàþY&