Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic keep track of the enabled state of a socket
details: https://anonhg.NetBSD.org/src/rev/3038d25d6419
branches: trunk
changeset: 481712:3038d25d6419
user: chopps <chopps%NetBSD.org@localhost>
date: Fri Feb 04 08:42:07 2000 +0000
description:
keep track of the enabled state of a socket
diffstat:
sys/dev/ic/i82365.c | 11 ++++++++++-
sys/dev/ic/i82365var.h | 3 ++-
2 files changed, 12 insertions(+), 2 deletions(-)
diffs (56 lines):
diff -r 65e9a7922a48 -r 3038d25d6419 sys/dev/ic/i82365.c
--- a/sys/dev/ic/i82365.c Fri Feb 04 08:01:43 2000 +0000
+++ b/sys/dev/ic/i82365.c Fri Feb 04 08:42:07 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82365.c,v 1.40 2000/02/03 09:00:39 enami Exp $ */
+/* $NetBSD: i82365.c,v 1.41 2000/02/04 08:42:07 chopps Exp $ */
#define PCICDEBUG
@@ -1334,6 +1334,11 @@
int reg;
#endif
+#ifdef DIAGNOSTIC
+ if (h->flags & PCIC_FLAG_ENABLED)
+ printf("pcic_chip_socket_enable: enabling twice");
+#endif
+
/* disable interrupts */
intr = pcic_read(h, PCIC_INTR);
intr &= ~(PCIC_INTR_IRQ_MASK | PCIC_INTR_ENABLE);
@@ -1422,6 +1427,8 @@
if (h->ioalloc & (1 << win))
pcic_chip_do_io_map(h, win);
+ h->flags |= PCIC_FLAG_ENABLED;
+
/* finally enable the interrupt */
intr |= h->ih_irq;
pcic_write(h, PCIC_INTR, intr);
@@ -1443,6 +1450,8 @@
/* power down the socket */
pcic_write(h, PCIC_PWRCTL, 0);
+
+ h->flags &= ~PCIC_FLAG_ENABLED;
}
static u_int8_t
diff -r 65e9a7922a48 -r 3038d25d6419 sys/dev/ic/i82365var.h
--- a/sys/dev/ic/i82365var.h Fri Feb 04 08:01:43 2000 +0000
+++ b/sys/dev/ic/i82365var.h Fri Feb 04 08:42:07 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82365var.h,v 1.10 2000/02/02 10:19:51 enami Exp $ */
+/* $NetBSD: i82365var.h,v 1.11 2000/02/04 08:42:07 chopps Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@@ -82,6 +82,7 @@
#define PCIC_FLAG_SOCKETP 0x0001
#define PCIC_FLAG_CARDP 0x0002
+#define PCIC_FLAG_ENABLED 0x0004
#define PCIC_LASTSTATE_PRESENT 0x0002
#define PCIC_LASTSTATE_HALF 0x0001
Home |
Main Index |
Thread Index |
Old Index