Module Name: src Committed By: bouyer Date: Sun Jul 2 15:09:53 UTC 2017
Modified Files: src/sys/arch/arm/allwinner: awin_can.c Log Message: In the RX IRQ handler, release the receive buffer in the error paths. Fix a hang I've been seeing under high traffic. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/allwinner/awin_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/allwinner/awin_can.c diff -u src/sys/arch/arm/allwinner/awin_can.c:1.2 src/sys/arch/arm/allwinner/awin_can.c:1.3 --- src/sys/arch/arm/allwinner/awin_can.c:1.2 Sat May 27 21:02:55 2017 +++ src/sys/arch/arm/allwinner/awin_can.c Sun Jul 2 15:09:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_can.c,v 1.2 2017/05/27 21:02:55 bouyer Exp $ */ +/* $NetBSD: awin_can.c,v 1.3 2017/07/02 15:09:53 bouyer Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.2 2017/05/27 21:02:55 bouyer Exp $"); +__KERNEL_RCSID(1, "$NetBSD: awin_can.c,v 1.3 2017/07/02 15:09:53 bouyer Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -239,12 +239,14 @@ awin_can_rx_intr(struct awin_can_softc * if (dlc > CAN_MAX_DLC) { ifp->if_ierrors++; + awin_can_write(sc, AWIN_CAN_CMD_REG, AWIN_CAN_CMD_REL_RX_BUF); return; } m = m_gethdr(M_NOWAIT, MT_HEADER); if (m == NULL) { ifp->if_ierrors++; + awin_can_write(sc, AWIN_CAN_CMD_REG, AWIN_CAN_CMD_REL_RX_BUF); return; } cf = mtod(m, struct can_frame *);