This is an automated email from the ASF dual-hosted git repository. lupyuen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 55f85dd727 drivers/ctucan: fix IRQ ctrl 55f85dd727 is described below commit 55f85dd727e670151d7455b22880a60036b3fe9f Author: Yanfeng Liu <p-liuyanfe...@xiaomi.com> AuthorDate: Wed Apr 16 09:28:12 2025 +0800 drivers/ctucan: fix IRQ ctrl This revises the post-IRQ interruption control logic so that to balance the disable/enable operations for both chardev and socketcan cases. Checked with chardev/socketcan on qemu-intel64. Signed-off-by: Yanfeng Liu <p-liuyanfe...@xiaomi.com> --- drivers/can/ctucanfd_pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/can/ctucanfd_pci.c b/drivers/can/ctucanfd_pci.c index 1037eba240..806f9c2445 100644 --- a/drivers/can/ctucanfd_pci.c +++ b/drivers/can/ctucanfd_pci.c @@ -970,9 +970,10 @@ static void ctucanfd_chardev_interrupt(FAR struct ctucanfd_driver_s *priv) ctucanfd_putreg(&priv->devs[i], CTUCANFD_INTSTAT, stat); - /* Re-enable RX interrupts */ + /* Re-enable RX/TX interrupts */ ctucanfd_rxint(&priv->devs[i], true); + ctucanfd_txint(&priv->devs[i], true); } } #endif /* CONFIG_CAN_CTUCANFD_CHARDEV */ @@ -1680,9 +1681,10 @@ static void ctucanfd_sock_interrupt_work(FAR void *arg) ctucanfd_putreg(&priv->devs[i], CTUCANFD_INTSTAT, stat); - /* Re-enable RX interrupts */ + /* Re-enable RX/TX interrupts */ ctucanfd_rxint(&priv->devs[i], true); + ctucanfd_txint(&priv->devs[i], true); } } #endif /* CONFIG_CAN_CTUCANFD_SOCKET */ @@ -1711,9 +1713,10 @@ static int ctucanfd_interrupt(int irq, FAR void *context, FAR void *arg) if (regval != 0) { - /* Disable RX interrupts until we handle all interrupts */ + /* Disable RX/TX interrupts until we are done */ ctucanfd_rxint(&priv->devs[i], false); + ctucanfd_txint(&priv->devs[i], false); break; }