Most recent kernel where this bug did not occur: Before suspend didn't work at all Distribution: Debian Hardware Environment: A7V8X motherboard (VT8235 PCI Bridge, VT82xxxxx UHCI USB 1.1 Controller) Software Environment: Vanilla 2.6.15.2 kernel, Bare system, Debian sarge Problem Description: If I try to go to S3 (echo mem > /sys/power/state), with the uhci_hcd modules loaded everything seems to go fine except that there's an immediate resume. [As an asside; I wonder if that has something to do with USB* being ACPI wakeup devices. Feb 2 20:09:54 commensaal kernel: ACPI wakeup devices: Feb 2 20:09:54 commensaal kernel: PCI0 PCI1 USB0 USB1 USB2 SU20 LAN ] Anyway, I tried to work around that problem by rmmod'ing uhci_hcd before suspend, and modprobing afterwards. This seems to work except that everything having to do with USB being really slow (I have a CF-reader that takes ages to mount, and then is really slow in transfer speed.) Now if use pci-config (it's by Donald Becker, http://www.scyld.com/diag/index.html) to check the status, it tells me that the device is in state D3. If I check /sys/bus/usb/..../power/state it contains 0. Now this program also has a --wake option, so I was adventurous and tried it on the usb devices. And that helped! pci-config reports state D0 and my CF-reader works at full speed!
Created attachment 7263 [details] lspci -vvv lspci -vvv of my box
Created attachment 7314 [details] workaround I guess this workaround can automatically switch the device to D0 state after you reload the driver at resume time. But the real issue of your problem is why your system has an immediate resume. So I'd like look at your acpidmp out. Thanks!
OK, I'll try make an acpidmp tonight. For now I'll attach two logs, one of a suspend-resume cycle with uhci_usb loaded and one without.
Created attachment 7336 [details] log of suspend /w module Log of echo > /sys/power/state with uhci_usb loaded. This resumes immediately.
Created attachment 7337 [details] log of suspend without module This is a log of rmmod uhci_usb echo mem > /sys/power/state modprobe uhci_usb Note ACPI complaining about "Device is not power manageable". That could well the root of the problem.
Created attachment 7352 [details] log of suspend without module This is a log of suspend to RAM without uhci_usb loaded, but now with debug messages included.
Created attachment 7353 [details] acpidump This a dump made with the acpidump utility from pmtools. I think this is what you want. If not, tell me.
Created attachment 7355 [details] log of suspend /w module This is a log of suspend to RAM wit uhci_usb loaded, but now with debug messages included.
Please run "lspci -vvv" again, but this time run it as root. Your earlier attachment doesn't include the PCI capabilities. When uhci-hcd is unloaded, the USB stack is out of the picture. Any suspend/resume processing is done by the PCI core. I don't know how it handles driverless devices... Maybe it puts them into D3 during suspend and just leaves them there during resume. "lspci -vvv" as root will show device's current power state.
Does the workaround in comment #2 change anything? If it works, I think we should push it to base kernel, because it's likely modules are unloaded/reloaded before/after suspend.
Created attachment 7372 [details] lspic -vvv Again lspci -vvv but now with root priv's
Yep the workaround in comment #2 works for me.
I noticed the fix from comment #2 isn't in 2.6.16, anything wrong with it?
Patrick Mochel sent a updated patch based on my previous patch. But for some known reason, the patch is missed. I'll ping him.
Any news? This report is getting old...
Patrick's suggested patch is here: http://marc.theaimsgroup.com/?l=linux-pci&m=114049761428561&w=2 It seems to have faded away. David, do you want to try reviving it? I think Patrick has been far too busy with other matters to work on this sort of thing lately...
Ok, I can take it. But I might have a little delay as I'm on holiday till Oct.8
Have we had any progress?
Yes, I sent a updated patch to akpm. It might be in -mm tree soon.
Patch is in base kenrel now.