Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic restore awi_power() to reenable awi after resume.



details:   https://anonhg.NetBSD.org/src/rev/66aa4c691e9c
branches:  trunk
changeset: 511758:66aa4c691e9c
user:      onoe <onoe%NetBSD.org@localhost>
date:      Tue Jun 26 08:41:19 2001 +0000

description:
restore awi_power() to reenable awi after resume.
... forgot why it is disabled...

diffstat:

 sys/dev/ic/awi.c |  23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diffs (51 lines):

diff -r 3ec81c959ef4 -r 66aa4c691e9c sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c  Tue Jun 26 02:28:47 2001 +0000
+++ b/sys/dev/ic/awi.c  Tue Jun 26 08:41:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awi.c,v 1.33 2001/06/25 12:09:51 onoe Exp $    */
+/*     $NetBSD: awi.c,v 1.34 2001/06/26 08:41:19 onoe Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -419,31 +419,30 @@
        int s;
        int ocansleep;
 
-       if (!sc->sc_enabled)
-               return;
-
        s = splnet();
        ocansleep = sc->sc_cansleep;
        sc->sc_cansleep = 0;
-#ifdef needtobefixed   /*ONOE*/
        switch (why) {
        case PWR_SUSPEND:
        case PWR_STANDBY:
-               awi_stop(sc);
-               if (sc->sc_disable)
-                       (*sc->sc_disable)(sc);
+               if (sc->sc_enabled) {
+                       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);
+               if (sc->sc_enabled) {
+                       sc->sc_enabled = 0;
+                       awi_init(sc);
+                       (void)awi_intr(sc);
+               }
                break;
        case PWR_SOFTSUSPEND:
        case PWR_SOFTSTANDBY:
        case PWR_SOFTRESUME:
                break;
        }
-#endif
        sc->sc_cansleep = ocansleep;
        splx(s);
 }



Home | Main Index | Thread Index | Old Index