[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1622011904.21671.3.camel@mhfsdcap03>
Date: Wed, 26 May 2021 14:51:44 +0800
From: Yongqiang Niu <yongqiang.niu@...iatek.com>
To: Chun-Kuang Hu <chunkuang.hu@...nel.org>
CC: Jassi Brar <jassisinghbrar@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Houlong Wei <houlong.wei@...iatek.com>,
"Bibby Hsieh" <bibby.hsieh@...iatek.com>,
Dennis YC Hsieh <dennis-yc.hsieh@...iatek.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH 2/3] mailbox: mtk-cmdq: Use mailbox rx_callback
Reviewed-by: Yongqiang Niu <yongqiang.niu@...iatek.com>
On Wed, 2021-05-26 at 14:17 +0800, Chun-Kuang Hu wrote:
> + Yongqiang
>
> Chun-Kuang Hu <chunkuang.hu@...nel.org> 於 2021年3月15日 週一 上午7:33寫道:
> >
> > rx_callback is a standard mailbox callback mechanism and could cover the
> > function of proprietary cmdq_task_cb, so use the standard one instead of
> > the proprietary one. But the client driver has already used cmdq_task_cb,
> > so keep cmdq_task_cb until all client driver use rx_callback instead of
> > cmdq_task_cb.
> >
> > Cc: Jassi Brar <jassisinghbrar@...il.com>
> > Cc: Matthias Brugger <matthias.bgg@...il.com>
> > Cc: Houlong Wei <houlong.wei@...iatek.com>
> > Cc: Bibby Hsieh <bibby.hsieh@...iatek.com>
> > Cc: Dennis YC Hsieh <dennis-yc.hsieh@...iatek.com>
> > Cc: linux-kernel@...r.kernel.org
> > Cc: linux-arm-kernel@...ts.infradead.org
> > Cc: linux-mediatek@...ts.infradead.org
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
> > ---
> > drivers/mailbox/mtk-cmdq-mailbox.c | 14 +++++++++-----
> > 1 file changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> > index 3d37c1cd40f1..ef59e2234f22 100644
> > --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> > +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> > @@ -188,7 +188,10 @@ static void cmdq_task_exec_done(struct cmdq_task *task, int sta)
> > WARN_ON(cb->cb == (cmdq_async_flush_cb)NULL);
> > data.sta = sta;
> > data.data = cb->data;
> > - cb->cb(data);
> > + if (cb->cb)
> > + cb->cb(data);
> > +
> > + mbox_chan_received_data(task->thread->chan, &data);
> >
> > list_del(&task->list_entry);
> > }
> > @@ -451,12 +454,13 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
> >
> > list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
> > list_entry) {
> > + data.sta = -ECONNABORTED;
> > + data.data = cb->data;
> > cb = &task->pkt->async_cb;
> > - if (cb->cb) {
> > - data.sta = -ECONNABORTED;
> > - data.data = cb->data;
> > + if (cb->cb)
> > cb->cb(data);
> > - }
> > +
> > + mbox_chan_received_data(task->thread->chan, &data);
> > list_del(&task->list_entry);
> > kfree(task);
> > }
> > --
> > 2.17.1
> >
Powered by blists - more mailing lists