lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAOTY_-yo0oWfgaCNNvkESgnWf6cyY=1g0T82-_aTJ-d7EiUWw@mail.gmail.com>
Date:   Wed, 26 May 2021 14:17:32 +0800
From:   Chun-Kuang Hu <chunkuang.hu@...nel.org>
To:     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>,
        Yongqiang Niu <yongqiang.niu@...iatek.com>
Cc:     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

+ 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ