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.28 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/fe0229444a42
branches:  netbsd-1-5
changeset: 491641:fe0229444a42
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 15:04:35 2001 +0000

description:
Pull up revision 1.28 (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/awi.c |  20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r acc3df3425d9 -r fe0229444a42 sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c  Sun May 06 15:04:12 2001 +0000
+++ b/sys/dev/ic/awi.c  Sun May 06 15:04:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awi.c,v 1.19.2.4 2000/07/21 18:55:58 onoe Exp $        */
+/*     $NetBSD: awi.c,v 1.19.2.5 2001/05/06 15:04:35 he Exp $  */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -435,14 +435,22 @@
        ocansleep = sc->sc_cansleep;
        sc->sc_cansleep = 0;
 #ifdef needtobefixed   /*ONOE*/
-       if (why == PWR_RESUME) {
+       switch (why) {
+       case PWR_SUSPEND:
+       case PWR_STANDBY:
+               awi_stop(sc);
+               if (sc->sc_disable)
+                       (*sc->sc_disable)(sc);
+               break;
+       case PWR_RESUME:
                sc->sc_enabled = 0;
                awi_init(sc);
                (void)awi_intr(sc);
-       } else {
-               awi_stop(sc);
-               if (sc->sc_disable)
-                       (*sc->sc_disable)(sc);
+               break;
+       case PWR_SOFTSUSPEND:
+       case PWR_SOFTSTANDBY:
+       case PWR_SOFTRESUME:
+               break;
        }
 #endif
        sc->sc_cansleep = ocansleep;



Home | Main Index | Thread Index | Old Index