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.19 (via patch, requested ...



details:   https://anonhg.NetBSD.org/src/rev/57beeb6f692d
branches:  netbsd-1-5
changeset: 491643:57beeb6f692d
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 15:05:17 2001 +0000

description:
Pull up revision 1.19 (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/rtl81x9.c |  22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r 7ce37106bc0b -r 57beeb6f692d sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Sun May 06 15:04:55 2001 +0000
+++ b/sys/dev/ic/rtl81x9.c      Sun May 06 15:05:17 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.11.4.4 2001/03/13 20:43:55 he Exp $      */
+/*     $NetBSD: rtl81x9.c,v 1.11.4.5 2001/05/06 15:05:17 he Exp $      */
 
 /*
  * Copyright (c) 1997, 1998
@@ -930,14 +930,24 @@
        int s;
 
        s = splnet();
-       if (why != PWR_RESUME) {
+       switch (why) {
+       case PWR_SUSPEND:
+       case PWR_STANDBY:
                rtk_stop(sc);
                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);
-               rtk_init(sc);
+               break;
+       case PWR_RESUME:
+               if (ifp->if_flags & IFF_UP) {
+                       if (sc->sc_power != NULL)
+                               (*sc->sc_power)(sc, why);
+                       rtk_init(sc);
+               }
+               break;
+       case PWR_SOFTSUSPEND:
+       case PWR_SOFTSTANDBY:
+       case PWR_SOFTRESUME:
+               break;
        }
        splx(s);
 }



Home | Main Index | Thread Index | Old Index