lkml.org 
[lkml]   [2016]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback
On Mon, Aug 22, 2016 at 09:27:04AM -0400, Sinan Kaya wrote:
> >>>>> You didn't answer my question!
> >>>>>
> >>>>> On error you said you flush, so who does that?
> >>>>
> >>>> This is done by the driver in interrupt context when an error
> >>>> interrupt is received. All transactions are posted and hw is reset.
> >>>
> >>> Hmmm, waht about the txn which are pending? DO you clear them..?
> >>>
> >>
> >> Yes, I clear both pending and active transactions.
> >
> > Okay, in that case your can consider below:
> >
> > 1. dmaengine asserts error interrupt
> > 2. Driver receives and mark's the txn as error
> > 3. Driver completes the txn and intimates the client. No further
> > submissions. Drop the locks before calling callback, as subsequent
> > processing by client maybe in callback thread.
> > 4. Client invokes status and you can return error
> > 5. On error, client calls terminate_all. You can reset channel, free all
> > descriptors in the active, pending and completed lists
> > 6. Client prepares new txn and so on..
>
>
> Just to be clear, you are telling me not to accept any new transactions until
> terminate_all is called, right?

You may return error for those cases, but my guess is that since you are
interrupt driven, the error propagation in callback and query will be
faster.

--
~Vinod

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.145 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site