Receive buffer not empty (RBNEI) handling
I have seen proposed patch "driver: mask RBNEI instead of just disabling it". In general, I agree that CTUCAN_FLAG_RX_SCHED is not ideal option, but manipulating with both interrupt enable and mask registers would result in bigger overhead than the additional if statement.
I understand that masking helps that there is not accumulated abundant RBNEI during NAPI processing which causes unnecessary interrupt when it is reenabled.
I general, I would like more manipulation with RBNEI interrupt enable only and changing core logic which changes RBNEI and TXBHCI bits to be real level only interrupts which are negated when all data is read/none buffer left empty.