Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/sunxi Don't process RX if SUNXI_CAN_INT_DATA_OR...



details:   https://anonhg.NetBSD.org/src/rev/ebd598f9b0e6
branches:  trunk
changeset: 370154:ebd598f9b0e6
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Sep 19 11:21:36 2022 +0000

description:
Don't process RX if SUNXI_CAN_INT_DATA_OR is pending. Seems to fix occasional
RX stalls

diffstat:

 sys/arch/arm/sunxi/sunxi_can.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r b6bc919c4348 -r ebd598f9b0e6 sys/arch/arm/sunxi/sunxi_can.c
--- a/sys/arch/arm/sunxi/sunxi_can.c    Mon Sep 19 09:15:01 2022 +0000
+++ b/sys/arch/arm/sunxi/sunxi_can.c    Mon Sep 19 11:21:36 2022 +0000
@@ -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 @@
                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);



Home | Main Index | Thread Index | Old Index