* [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq
@ 2020-05-11 5:50 joe_zhuchg
2020-05-30 20:25 ` Jassi Brar
0 siblings, 1 reply; 3+ messages in thread
From: joe_zhuchg @ 2020-05-11 5:50 UTC (permalink / raw)
To: jassisinghbrar; +Cc: linux-kernel, Joe Zhu
From: Joe Zhu <Chunguang.Zhu@verisilicon.com>
client does not know and not care about how controller implement tx done.
mbox_client_txdone() may be called when controller uses irq method.
Signed-off-by: Joe Zhu <Chunguang.Zhu@verisilicon.com>
---
drivers/mailbox/mailbox.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 0b821a5b2db8..116124adf188 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -189,7 +189,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_txdone);
void mbox_client_txdone(struct mbox_chan *chan, int r)
{
if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) {
- dev_err(chan->mbox->dev, "Client can't run the TX ticker\n");
+ if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ)))
+ dev_err(chan->mbox->dev,
+ "Client can't run the TX ticker\n");
return;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq
2020-05-11 5:50 [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq joe_zhuchg
@ 2020-05-30 20:25 ` Jassi Brar
2020-06-01 6:56 ` 答复: " Zhu, Joe
0 siblings, 1 reply; 3+ messages in thread
From: Jassi Brar @ 2020-05-30 20:25 UTC (permalink / raw)
To: joe_zhuchg; +Cc: Linux Kernel Mailing List, Joe Zhu
On Mon, May 11, 2020 at 12:52 AM <joe_zhuchg@126.com> wrote:
>
> From: Joe Zhu <Chunguang.Zhu@verisilicon.com>
>
> client does not know and not care about how controller implement tx done.
> mbox_client_txdone() may be called when controller uses irq method.
>
> Signed-off-by: Joe Zhu <Chunguang.Zhu@verisilicon.com>
> ---
> drivers/mailbox/mailbox.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
> index 0b821a5b2db8..116124adf188 100644
> --- a/drivers/mailbox/mailbox.c
> +++ b/drivers/mailbox/mailbox.c
> @@ -189,7 +189,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_txdone);
> void mbox_client_txdone(struct mbox_chan *chan, int r)
> {
> if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) {
> - dev_err(chan->mbox->dev, "Client can't run the TX ticker\n");
> + if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ)))
> + dev_err(chan->mbox->dev,
> + "Client can't run the TX ticker\n");
> return;
> }
If it is not by ACK, client should not call txdone() so we shout
immediately. Otherwise something is wrong.
thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* 答复: [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq
2020-05-30 20:25 ` Jassi Brar
@ 2020-06-01 6:56 ` Zhu, Joe
0 siblings, 0 replies; 3+ messages in thread
From: Zhu, Joe @ 2020-06-01 6:56 UTC (permalink / raw)
To: Jassi Brar, joe_zhuchg; +Cc: Linux Kernel Mailing List
Hi Jassi,
Client can not know how mailbox controller implements TX done. There is no API in mailbox_client.h to get this information.
I think it is framework' responsibility, not client, to handle controller' different behavior. Thanks!
Regards,
Joe
-----邮件原件-----
发件人: Jassi Brar [mailto:jassisinghbrar@gmail.com]
发送时间: 2020年5月31日 4:25
收件人: joe_zhuchg@126.com
抄送: Linux Kernel Mailing List; Zhu, Joe
主题: Re: [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq
On Mon, May 11, 2020 at 12:52 AM <joe_zhuchg@126.com> wrote:
>
> From: Joe Zhu <Chunguang.Zhu@verisilicon.com>
>
> client does not know and not care about how controller implement tx done.
> mbox_client_txdone() may be called when controller uses irq method.
>
> Signed-off-by: Joe Zhu <Chunguang.Zhu@verisilicon.com>
> ---
> drivers/mailbox/mailbox.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
> index 0b821a5b2db8..116124adf188 100644
> --- a/drivers/mailbox/mailbox.c
> +++ b/drivers/mailbox/mailbox.c
> @@ -189,7 +189,9 @@ EXPORT_SYMBOL_GPL(mbox_chan_txdone);
> void mbox_client_txdone(struct mbox_chan *chan, int r)
> {
> if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) {
> - dev_err(chan->mbox->dev, "Client can't run the TX ticker\n");
> + if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ)))
> + dev_err(chan->mbox->dev,
> + "Client can't run the TX ticker\n");
> return;
> }
If it is not by ACK, client should not call txdone() so we shout
immediately. Otherwise something is wrong.
thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-01 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 5:50 [PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq joe_zhuchg
2020-05-30 20:25 ` Jassi Brar
2020-06-01 6:56 ` 答复: " Zhu, Joe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.