Created attachment 17120 [details]
Dmesg including boot, suspend, and WARNING
Created attachment 17121 [details]
Debug patch to check device tree
Use CONFIG_PM_VERBOSE to output device's parents when added.
Created attachment 17122 [details]
Dmesg for boot with debug patch
Created attachment 17124 [details]
Corrected debug patch
Sorry, that was rushed. I forgot to insert ->parent after copy&pasting.
Created attachment 17125 [details]
Dmesg for corrected patch
This kernel log shows boot, suspend, and WARNING with the extra debug info,
Oliver - there's a lot of debug output, and I'm not sure exactly which bits you're interested in. Perhaps I shouldn't have used CONFIG_PM_VERBOSE.
Anyway, let me give this some more human-readable context. The USB device in question is:
$ lsusb|grep eMPIA
Bus 001 Device 003: ID eb1a:2761 eMPIA Technology, Inc.
And the physical device tree looks like this:
$ lsusb -t
`-Dev# 1 Vendor 0x1d6b Product 0x0001
`-Dev# 1 Vendor 0x1d6b Product 0x0002
|-Dev# 2 Vendor 0x0951 Product 0x1606
`-Dev# 3 Vendor 0xeb1a Product 0x2761
Am Donnerstag 07 August 2008 13:44:41 schrieb email@example.com:
> ------- Comment #6 from firstname.lastname@example.org 2008-08-07 04:44 -------
> Oliver - there's a lot of debug output, and I'm not sure exactly which bits
> you're interested in. Perhaps I shouldn't have used CONFIG_PM_VERBOSE.
The callchain goes through device_resume()->dpm_resume() which should have
set the parent to DPM_RESUMING, so the warning should not have triggered.
Can you also print the parent's power state in the branch leading to the WARN
in device_pm_add() ?
"video4linux video0: parent 1-8:1.0 is sleeping (status 5), will not add"
5 == DPM_OFF
This is a known problem caused by changes to the driver core. I haven't had time yet to update the USB suspend/resume infrastructure to match.
*** Bug 11284 has been marked as a duplicate of this bug. ***
Created attachment 17148 [details]
Patch that should fix the problem
Well, it looks like we have to drop the WARN_ON(true) that produces those stack traces until USB is redesigned not to trigger it.
Created attachment 17180 [details]
Implement the new PM ops for USB
This patch should fix the underlying problem. Try it out, with Rafael's patch removed so that you can easily observe any unwanted symptoms.
Yes, that gets rid of the warning. I found another bug during testing, but it also happens without the patch.
If I suspend with my card reader inserted & mounted, my laptop hangs on resume. I get a blank screen with a flashing text cursor. I will investigate this further and open a new bug.
Fixed by: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5a6d958b5d0a10e7e7a9dee1862fb31d08c6d26