Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Also disable MCR4INT in ubsec_detach() when appr...
details: https://anonhg.NetBSD.org/src/rev/6be47cb06363
branches: trunk
changeset: 325475:6be47cb06363
user: bad <bad%NetBSD.org@localhost>
date: Thu Dec 26 00:51:23 2013 +0000
description:
Also disable MCR4INT in ubsec_detach() when appropriate.
diffstat:
sys/dev/pci/ubsec.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 164756c51ad7 -r 6be47cb06363 sys/dev/pci/ubsec.c
--- a/sys/dev/pci/ubsec.c Thu Dec 26 00:19:07 2013 +0000
+++ b/sys/dev/pci/ubsec.c Thu Dec 26 00:51:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ubsec.c,v 1.34 2013/11/17 23:20:18 bad Exp $ */
+/* $NetBSD: ubsec.c,v 1.35 2013/12/26 00:51:23 bad Exp $ */
/* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */
/* $OpenBSD: ubsec.c,v 1.127 2003/06/04 14:04:58 jason Exp $ */
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.34 2013/11/17 23:20:18 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.35 2013/12/26 00:51:23 bad Exp $");
#undef UBSEC_DEBUG
@@ -544,11 +544,17 @@
{
struct ubsec_softc *sc = device_private(self);
struct ubsec_q *q, *qtmp;
+ volatile u_int32_t ctrl;
/* disable interrupts */
/* XXX wait/abort current ops? where is DMAERR enabled? */
- WRITE_REG(sc, BS_CTRL, READ_REG(sc, BS_CTRL) &~
- (BS_CTRL_MCR2INT | BS_CTRL_MCR1INT | BS_CTRL_DMAERR));
+ ctrl = READ_REG(sc, BS_CTRL);
+
+ ctrl &= ~(BS_CTRL_MCR2INT | BS_CTRL_MCR1INT | BS_CTRL_DMAERR);
+ if (sc->sc_flags & UBS_FLAGS_MULTIMCR)
+ ctrl &= ~BS_CTRL_MCR4INT;
+
+ WRITE_REG(sc, BS_CTRL, ctrl);
#ifndef UBSEC_NO_RNG
if (sc->sc_flags & UBS_FLAGS_RNG) {
Home |
Main Index |
Thread Index |
Old Index