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



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

description:
Pull up revision 1.42 (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/i82557.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r fe0229444a42 -r 7ce37106bc0b sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Sun May 06 15:04:35 2001 +0000
+++ b/sys/dev/ic/i82557.c       Sun May 06 15:04:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.34.2.2 2000/12/31 20:14:54 jhawk Exp $    */
+/*     $NetBSD: i82557.c,v 1.34.2.3 2001/05/06 15:04:55 he Exp $       */
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -477,12 +477,20 @@
        int s;
 
        s = splnet();
-       if (why != PWR_RESUME)
+       switch (why) {
+       case PWR_SUSPEND:
+       case PWR_STANDBY:
                fxp_stop(sc, 0);
-       else {
+               break;
+       case PWR_RESUME:
                ifp = &sc->sc_ethercom.ec_if;
                if (ifp->if_flags & IFF_UP)
                        fxp_init(sc);
+               break;
+       case PWR_SOFTSUSPEND:
+       case PWR_SOFTSTANDBY:
+       case PWR_SOFTRESUME:
+               break;
        }
        splx(s);
 }



Home | Main Index | Thread Index | Old Index