Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Handle the (weird) case when the power hook is c...
details: https://anonhg.NetBSD.org/src/rev/cb550fc076ab
branches: trunk
changeset: 477239:cb550fc076ab
user: augustss <augustss%NetBSD.org@localhost>
date: Sun Oct 17 15:31:00 1999 +0000
description:
Handle the (weird) case when the power hook is called with a resume
without a prior suspend.
diffstat:
sys/dev/usb/uhci.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 85147a47ef23 -r cb550fc076ab sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c Sun Oct 17 15:06:45 1999 +0000
+++ b/sys/dev/usb/uhci.c Sun Oct 17 15:31:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.60 1999/10/16 15:35:18 augustss Exp $ */
+/* $NetBSD: uhci.c,v 1.61 1999/10/17 15:31:00 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -526,6 +526,7 @@
UHCICMD(sc, cmd | UHCI_CMD_EGSM); /* enter global suspend */
usb_delay_ms(&sc->sc_bus, USB_RESUME_WAIT);
sc->sc_suspend = why;
+ sc->sc_bus.use_polling--;
DPRINTF(("uhci_power: cmd=0x%x\n", UREAD2(sc, UHCI_CMD)));
} else {
/*
@@ -534,11 +535,10 @@
* not restored them.
*/
#ifdef DIAGNOSTIC
- if (sc->sc_bus.use_polling == 0) {
- printf("uhci_power: weird, polling not set.\n");
- sc->sc_bus.use_polling = 1;
- }
+ if (sc->sc_suspend == PWR_RESUME)
+ printf("uhci_power: weird, resume without suspend.\n");
#endif
+ sc->sc_bus.use_polling++;
sc->sc_suspend = why;
if (cmd & UHCI_CMD_RS)
uhci_run(sc, 0); /* in case BIOS has started it */
Home |
Main Index |
Thread Index |
Old Index