Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.82 (via patch, requested ...
details: https://anonhg.NetBSD.org/src/rev/36cab4fd93a5
branches: netbsd-1-5
changeset: 491644:36cab4fd93a5
user: he <he%NetBSD.org@localhost>
date: Sun May 06 15:05:36 2001 +0000
description:
Pull up revision 1.82 (via patch, requested by he):
Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
diffstat:
sys/dev/ic/tulip.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 57beeb6f692d -r 36cab4fd93a5 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c Sun May 06 15:05:17 2001 +0000
+++ b/sys/dev/ic/tulip.c Sun May 06 15:05:36 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tulip.c,v 1.68.4.6 2001/04/23 22:05:52 he Exp $ */
+/* $NetBSD: tulip.c,v 1.68.4.7 2001/05/06 15:05:36 he Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -2001,14 +2001,24 @@
int s;
s = splnet();
- if (why != PWR_RESUME) {
+ switch (why) {
+ case PWR_SUSPEND:
+ case PWR_STANDBY:
tlp_stop(sc, 0);
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, why);
- } else if (ifp->if_flags & IFF_UP) {
- if (sc->sc_power != NULL)
- (*sc->sc_power)(sc, why);
- tlp_init(sc);
+ break;
+ case PWR_RESUME:
+ if (ifp->if_flags & IFF_UP) {
+ if (sc->sc_power != NULL)
+ (*sc->sc_power)(sc, why);
+ tlp_init(sc);
+ }
+ break;
+ case PWR_SOFTSUSPEND:
+ case PWR_SOFTSTANDBY:
+ case PWR_SOFTRESUME:
+ break;
}
splx(s);
}
Home |
Main Index |
Thread Index |
Old Index