NetBSD Problem Report #11714
Received: (qmail 16693 invoked from network); 13 Dec 2000 01:34:47 -0000
Message-Id: <200012130134.KAA09457@wonder2.aist-nara.ac.jp>
Date: Wed, 13 Dec 2000 10:34:46 +0900 (JST)
From: itohy@netbsd.org (ITOH Yasufumi)
Reply-To: itohy@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: OHCI card causes resume failure after APM suspend
X-Send-Pr-Version: 3.95
>Number: 11714
>Category: kern
>Synopsis: OHCI card causes resume failure after APM suspend
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 13 01:35:01 +0000 2000
>Closed-Date: Wed Dec 13 03:21:11 +0000 2000
>Last-Modified: Wed Dec 13 03:21:11 +0000 2000
>Originator: ITOH Yasufumi
>Release: 1.5L (Dec. 8, 2000)
>Organization:
>Environment:
System: NetBSD pino.my.domain 1.5L NetBSD 1.5L (PINO) #247: Sun Dec 10 14:13:46 JST 2000 itohy@pino.my.domain:/w/src/sys/arch/i386/compile/PINO i386
Architecture: i386
Machine: i386
machine: Toshiba Libretto 100
kernel dmesg:
:
cbb0 at pci0 dev 19 function 0: Toshiba ToPIC95B CardBus-PCI Bridge (rev. 0x07)
cbb1 at pci0 dev 19 function 1: Toshiba ToPIC95B CardBus-PCI Bridge (rev. 0x07)
cbb0: interrupting at irq 11
cbb0: cacheline 0x0 lattimer 0x0
cbb0: bhlc 0x820000 lscp 0x141400
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 20 device 0 cacheline 0x0, lattimer 0x0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cbb1: cacheline 0x0 lattimer 0x0
cbb1: bhlc 0x820000 lscp 0x151500
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 21 device 0 cacheline 0x0, lattimer 0x0
pcmcia1 at cardslot1
:
ohci0 at cardbus1 dev 0 function 0: Opti RM861HA (rev. 0x10)
ohci0: interrupting at 11
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Opti OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ums0 at uhub0 port 1 configuration 1 interface 0
ums0: vendor 0x05e3 USB Mouse, rev 1.00/1.01, addr 2, iclass 3/1
ums0: 3 buttons and Z dir.
wsmouse1 at ums0 mux 0
>Description:
If you suspend the system while OHCI CardBus card is present,
APM suspend/resume will always fails.
>How-To-Repeat:
1. Insert OHCI USB card into a CardBus slot.
2. suspend the system
# zzz
3. resume the system, and you will feel sorrow
at seeing resuming failed.
>Fix:
Implement suspend/resume of OHCI.
The following change works around the APM suspend/resume failure,
but the device will not work after suspend/resume cycle.
diff -uF^[a-zA-Z_][a-z A-Z0-9_]*([^;]*$ sys/dev/usb/ohci.c.orig sys/dev/usb/ohci.c
--- sys/dev/usb/ohci.c.orig Sat Nov 11 16:32:47 2000
+++ sys/dev/usb/ohci.c Sun Dec 10 18:14:22 2000
@@ -939,12 +939,32 @@ ohci_shutdown(void *v)
void
ohci_power(int why, void *v)
{
-#ifdef OHCI_DEBUG
+#if 1
ohci_softc_t *sc = v;
+ int s;
+ s = splusb();
+#endif
+#ifdef OHCI_DEBUG
DPRINTF(("ohci_power: sc=%p, why=%d\n", sc, why));
/* XXX should suspend/resume */
ohci_dumpregs(sc);
+#endif
+#if 1
+ switch (why) {
+ case PWR_SUSPEND:
+ case PWR_STANDBY:
+ OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_SUSPEND);
+ break;
+ case PWR_RESUME:
+ OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESUME);
+ break;
+ case PWR_SOFTSUSPEND:
+ case PWR_SOFTSTANDBY:
+ case PWR_SOFTRESUME:
+ break;
+ }
+ splx(s);
#endif
}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: augustss
State-Changed-When: Tue Dec 12 19:20:55 PST 2000
State-Changed-Why:
Patch applied.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.