This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ccce83ebcbfef2f7abcf30aaa722156c469ff2cb Author: p-szafonimateusz <[email protected]> AuthorDate: Wed Oct 28 15:11:28 2026 +0100 drivers/can/ctucanfd_pci.c: Clear only RBNEI before re-enabling RX. The SocketCAN receive path cleared all CTUCANFD_SOCK_RXINT bits before re-enabling RX interrupts. With CONFIG_NET_CAN_ERRORS that mask also holds the error interrupt, so pending errors were cleared before ctucanfd_sock_error() could read them. Clear only RBNEI. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: p-szafonimateusz <[email protected]> --- drivers/can/ctucanfd_pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/can/ctucanfd_pci.c b/drivers/can/ctucanfd_pci.c index 2e555dc4aff..60026cfd814 100644 --- a/drivers/can/ctucanfd_pci.c +++ b/drivers/can/ctucanfd_pci.c @@ -1282,9 +1282,12 @@ static FAR netpkt_t *ctucanfd_sock_recv(FAR struct netdev_lowerhalf_s *dev) regval = ctucanfd_getreg(priv, CTUCANFD_RXSETSTAT); if ((regval & CTUCANFD_RXSTAT_RXE) != 0) { - /* Clear RX interrupt before re-enabling interrupts */ + /* Clear the RX buffer not empty interrupt before re-enabling RX + * interrupts. Leave the error interrupts pending, they are handled + * by ctucanfd_sock_error(). + */ - ctucanfd_putreg(priv, CTUCANFD_INTSTAT, CTUCANFD_SOCK_RXINT); + ctucanfd_putreg(priv, CTUCANFD_INTSTAT, CTUCANFD_INT_RBNEI); /* Re-enable RX interrupts if no more messages to read */
