Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic eqos: Freeze counters to prevent unhandled interr...
details: https://anonhg.NetBSD.org/src/rev/fb425a59f788
branches: trunk
changeset: 365274:fb425a59f788
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Apr 16 23:20:47 2022 +0000
description:
eqos: Freeze counters to prevent unhandled interrupts
diffstat:
sys/dev/ic/dwc_eqos.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r fd990abf3afc -r fb425a59f788 sys/dev/ic/dwc_eqos.c
--- a/sys/dev/ic/dwc_eqos.c Sat Apr 16 22:21:10 2022 +0000
+++ b/sys/dev/ic/dwc_eqos.c Sat Apr 16 23:20:47 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_eqos.c,v 1.5 2022/02/13 18:29:15 riastradh Exp $ */
+/* $NetBSD: dwc_eqos.c,v 1.6 2022/04/16 23:20:47 jmcneill Exp $ */
/*-
* Copyright (c) 2022 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
#include "opt_net_mpsafe.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.5 2022/02/13 18:29:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.6 2022/04/16 23:20:47 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -565,6 +565,12 @@
val |= GMAC_DMA_CHAN0_RX_CONTROL_START;
WR4(sc, GMAC_DMA_CHAN0_RX_CONTROL, val);
+ /* Disable counters */
+ WR4(sc, GMAC_MMC_CONTROL,
+ GMAC_MMC_CONTROL_CNTFREEZ |
+ GMAC_MMC_CONTROL_CNTPRST |
+ GMAC_MMC_CONTROL_CNTPRSTLVL);
+
/* Configure operation modes */
WR4(sc, GMAC_MTL_TXQ0_OPERATION_MODE,
GMAC_MTL_TXQ0_OPERATION_MODE_TSF |
Home |
Main Index |
Thread Index |
Old Index