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/usb Pull up revision 1.128 (requested by he):
details: https://anonhg.NetBSD.org/src/rev/bae0d7114eac
branches: netbsd-1-5
changeset: 491646:bae0d7114eac
user: he <he%NetBSD.org@localhost>
date: Sun May 06 15:06:16 2001 +0000
description:
Pull up revision 1.128 (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/usb/uhci.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r be934d7c5484 -r bae0d7114eac sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Sun May 06 15:05:59 2001 +0000
+++ b/sys/dev/usb/uhci.c Sun May 06 15:06:16 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.120.2.1 2000/08/22 04:11:54 augustss Exp $ */
+/* $NetBSD: uhci.c,v 1.120.2.2 2001/05/06 15:06:16 he Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -646,7 +646,9 @@
DPRINTF(("uhci_power: sc=%p, why=%d (was %d), cmd=0x%x\n",
sc, why, sc->sc_suspend, cmd));
- if (why != PWR_RESUME) {
+ switch (why) {
+ case PWR_SUSPEND:
+ case PWR_STANDBY:
#ifdef UHCI_DEBUG
if (uhcidebug > 2)
uhci_dumpregs(sc);
@@ -666,7 +668,8 @@
sc->sc_suspend = why;
sc->sc_bus.use_polling--;
DPRINTF(("uhci_power: cmd=0x%x\n", UREAD2(sc, UHCI_CMD)));
- } else {
+ break;
+ case PWR_RESUME:
#ifdef DIAGNOSTIC
if (sc->sc_suspend == PWR_RESUME)
printf("uhci_power: weird, resume without suspend.\n");
@@ -696,6 +699,11 @@
if (uhcidebug > 2)
uhci_dumpregs(sc);
#endif
+ break;
+ case PWR_SOFTSUSPEND:
+ case PWR_SOFTSTANDBY:
+ case PWR_SOFTRESUME:
+ break;
}
splx(s);
}
Home |
Main Index |
Thread Index |
Old Index