mailbox: pcc: Notify clients on polled completion
Sudeep Holla
maintainerPATCH v2 1/1 mailbox: pcc: Notify clients on polled completion
PCC channels without a platform interrupt rely on the mailbox polling path to detect command completion.
That path currently only reports transmit completion to the mailbox core, so clients that wait for their receive callback do not get notified when the command completes.
Call mbox_chan_received_data() when polling observes completion on a channel without a platform IRQ, matching the interrupt-driven completion path.
---v1->v2:
- Check if MBOX_TXDONE_BY_POLL instead of absence of pchan->plat_irq
v1: https://patch.msgid.link/[email protected]
drivers/mailbox/pcc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/mailbox/pcc.c +9 -1
@@ -490,7 +490,15 @@ static bool pcc_last_tx_done(struct mbox_chan *chan) {struct pcc_chan_info *pchan = chan->con_priv; -return pcc_mbox_cmd_complete_check (pchan); +if (!(chan->txdone_method &MBOX_TXDONE_BY_POLL )) +return false; + +if (!pcc_mbox_cmd_complete_check (pchan)) +return false; + +mbox_chan_received_data (chan,NULL ); + +return true; }/**
Signature · 1 line
2.43.0
Quoted 7 lines · Sudeep Holla
PCC channels without a platform interrupt rely on the mailbox polling path to detect command completion.
That path currently only reports transmit completion to the mailbox core, so clients that wait for their receive callback do not get notified when the command completes.
Quoted 6 lines
Call
mbox_chan_received_data()when polling observes completion on a channel without a platform IRQ, matching the interrupt-driven completion path.Reported-by Cristian Marussi <[email protected]>Signed-off-by Sudeep Holla <[email protected]>
LGTM,
Quoted 30 lines
---
v1->v2:
- Check ifMBOX_TXDONE_BY_POLLinstead of absence ofpchan->plat_irqv1: https://patch.msgid.link/[email protected]
drivers/mailbox/pcc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/mailbox/pcc.c +9
-1@@ -490,7 +490,15 @@ static bool pcc_last_tx_done(struct mbox_chan *chan) {struct pcc_chan_info *pchan = chan->con_priv; -return pcc_mbox_cmd_complete_check (pchan); +if (!(chan->txdone_method &MBOX_TXDONE_BY_POLL )) +return false; + +if (!pcc_mbox_cmd_complete_check (pchan)) +return false; + +mbox_chan_received_data (chan,NULL ); + +return true; }/**
Quoted 7 lines · Sudeep Holla
PCC channels without a platform interrupt rely on the mailbox polling path to detect command completion.
That path currently only reports transmit completion to the mailbox core, so clients that wait for their receive callback do not get notified when the command completes.
Quoted 6 lines
Call
mbox_chan_received_data()when polling observes completion on a channel without a platform IRQ, matching the interrupt-driven completion path.Reported-by Cristian Marussi <[email protected]>Signed-off-by Sudeep Holla <[email protected]>
LGTM,
Quoted 1 line
/**