Module Name: src Committed By: bouyer Date: Mon Sep 19 11:21:36 UTC 2022
Modified Files: src/sys/arch/arm/sunxi: sunxi_can.c Log Message: Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional RX stalls To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sunxi/sunxi_can.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/sunxi/sunxi_can.c diff -u src/sys/arch/arm/sunxi/sunxi_can.c:1.9 src/sys/arch/arm/sunxi/sunxi_can.c:1.10 --- src/sys/arch/arm/sunxi/sunxi_can.c:1.9 Sun Sep 18 15:28:01 2022 +++ src/sys/arch/arm/sunxi/sunxi_can.c Mon Sep 19 11:21:36 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_can.c,v 1.9 2022/09/18 15:28:01 thorpej Exp $ */ +/* $NetBSD: sunxi_can.c,v 1.10 2022/09/19 11:21:36 bouyer Exp $ */ /*- * Copyright (c) 2017,2018 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.9 2022/09/18 15:28:01 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.10 2022/09/19 11:21:36 bouyer Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -387,7 +387,8 @@ sunxi_can_intr(void *arg) if (irq & SUNXI_CAN_INT_TX_FLAG) { sunxi_can_tx_intr(sc); } - if (irq & SUNXI_CAN_INT_RX_FLAG) { + if ((irq & (SUNXI_CAN_INT_RX_FLAG | SUNXI_CAN_INT_DATA_OR)) == + SUNXI_CAN_INT_RX_FLAG) { while (sts & SUNXI_CAN_STA_RX_RDY) { sunxi_can_rx_intr(sc); sts = sunxi_can_read(sc, SUNXI_CAN_STA_REG);