Messages in this thread | | | Date | Wed, 19 Mar 2014 10:50:22 +0530 | Subject | Re: [PATCHv4 2/5] mailbox: Introduce framework for mailbox | From | Jassi Brar <> |
| |
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" ?
Thanks Jassi
| |