Module Name: src
Committed By: jmcneill
Date: Sat Sep 6 12:48:22 UTC 2014
Modified Files:
src/sys/arch/arm/allwinner: awin_dma.c
Log Message:
fix off by one in intr handler
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/allwinner/awin_dma.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_dma.c
diff -u src/sys/arch/arm/allwinner/awin_dma.c:1.2 src/sys/arch/arm/allwinner/awin_dma.c:1.3
--- src/sys/arch/arm/allwinner/awin_dma.c:1.2 Sat Sep 6 12:39:27 2014
+++ src/sys/arch/arm/allwinner/awin_dma.c Sat Sep 6 12:48:22 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_dma.c,v 1.2 2014/09/06 12:39:27 jmcneill Exp $ */
+/* $NetBSD: awin_dma.c,v 1.3 2014/09/06 12:48:22 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <[email protected]>
@@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_dma.c,v 1.2 2014/09/06 12:39:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_dma.c,v 1.3 2014/09/06 12:48:22 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -160,7 +160,7 @@ awin_dma_intr(void *priv)
while ((bit = ffs(sta & AWIN_DMA_IRQ_END_MASK)) != 0) {
mask = __BIT(bit - 1);
sta &= ~mask;
- index = (bit / 2) & 7;
+ index = ((bit - 1) / 2) & 7;
if (mask & AWIN_DMA_IRQ_NDMA) {
if (awin_ndma_channels[index].ch_callback == NULL)
continue;