lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv4 2/5] mailbox: Introduce framework for mailbox
From
On Wed, Mar 19, 2014 at 10:50 AM, Jassi Brar <jaswinder.singh@linaro.org> wrote:
> On 19 March 2014 09:30, Girish KS <girishks2000@gmail.com> wrote:
>> On Wed, Mar 19, 2014 at 12:15 AM, Jassi Brar <jassisinghbrar@gmail.com> wrote:
>
>>> +int mbox_send_message(struct mbox_chan *chan, void *mssg)
>>> +{
>>> + int t;
>>> +
>>> + if (!chan || !chan->cl)
>>> + return -EINVAL;
>>> +
>>> + t = _add_to_rbuf(chan, mssg);
>>> + if (t < 0) {
>>> + pr_err("Try increasing MBOX_TX_QUEUE_LEN\n");
>>> + return t;
>>> + }
>>> +
>>> + _msg_submit(chan);
>>> +
>>> + if (chan->txdone_method == TXDONE_BY_POLL)
>>> + poll_txdone((unsigned long)chan->con);
>>
>> I came across a panic in the complete function. When i traced bact the
>> call sequence it was
>> When a client sets chan->cl->tx_block = true, and polling is enabled
>> for controller.
>> 1.Client sends the message with mbox_send_message. This function as
>> seen above will call __msg_submit (this calls the controller specific
>> send function).
>> 2. Since the tx method is polling the above condition is satisfied and
>> calls the poll_txdone function.
>> 3. In this poll function, the tx_tick function is invoked.
>> 4. In this tick function since the client has enabled the tx_block it
>> calls the notify function complete(&chan->tx_complete);
>> 5. Here there is a panic. because the complete is called before
>> initialization. init_completion needs to be called but not called.
>>
> Are you sure you have applied the patch "[PATCHv4 4/5] mailbox: Fix TX
> completion init" ?

I was missing it. I was using your old patch set

>
> Thanks
> Jassi


\
 
 \ /
  Last update: 2014-03-19 07:41    [W:0.046 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site