Bug 11263 - Re: 2.6.27-rc2: uvcvideo WARNING after suspend to ram
Re: 2.6.27-rc2: uvcvideo WARNING after suspend to ram
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: USB
All Linux
: P1 normal
Assigned To: Alan Stern
:
: 11284 (view as bug list)
Depends on:
Blocks: 7216 Regressions-2.6.26
  Show dependency treegraph
 
Reported: 2008-08-07 04:02 UTC by Alan Jenkins
Modified: 2008-08-22 15:27 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.27-rc2
Tree: Mainline
Regression: Yes


Attachments
Dmesg including boot, suspend, and WARNING (44.19 KB, text/plain)
2008-08-07 04:04 UTC, Alan Jenkins
Details
Debug patch to check device tree (620 bytes, patch)
2008-08-07 04:07 UTC, Alan Jenkins
Details | Diff
Dmesg for boot with debug patch (65.07 KB, text/plain)
2008-08-07 04:11 UTC, Alan Jenkins
Details
Corrected debug patch (644 bytes, patch)
2008-08-07 04:35 UTC, Alan Jenkins
Details | Diff
Dmesg for corrected patch (93.89 KB, text/plain)
2008-08-07 04:40 UTC, Alan Jenkins
Details
Patch that should fix the problem (1.12 KB, patch)
2008-08-08 15:55 UTC, Rafael J. Wysocki
Details | Diff
Implement the new PM ops for USB (10.92 KB, patch)
2008-08-11 12:48 UTC, Alan Stern
Details | Diff

Description Alan Jenkins 2008-08-07 04:02:41 UTC
References: http://comments.gmane.org/gmane.linux.kernel/717552
Comment 1 Alan Jenkins 2008-08-07 04:04:10 UTC
Created attachment 17120 [details]
Dmesg including boot, suspend, and WARNING
Comment 2 Alan Jenkins 2008-08-07 04:07:43 UTC
Created attachment 17121 [details]
Debug patch to check device tree

Use CONFIG_PM_VERBOSE to output device's parents when added.
Comment 3 Alan Jenkins 2008-08-07 04:11:10 UTC
Created attachment 17122 [details]
Dmesg for boot with debug patch
Comment 4 Alan Jenkins 2008-08-07 04:35:45 UTC
Created attachment 17124 [details]
Corrected debug patch

Sorry, that was rushed.  I forgot to insert ->parent after copy&pasting.
Comment 5 Alan Jenkins 2008-08-07 04:40:03 UTC
Created attachment 17125 [details]
Dmesg for corrected patch

This kernel log shows boot, suspend, and WARNING with the extra debug info,
Comment 6 Alan Jenkins 2008-08-07 04:44:41 UTC
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
Bus#  5
`-Dev#   1 Vendor 0x1d6b Product 0x0001
...
Bus#  1
`-Dev#   1 Vendor 0x1d6b Product 0x0002
  |-Dev#   2 Vendor 0x0951 Product 0x1606
  `-Dev#   3 Vendor 0xeb1a Product 0x2761
Comment 7 Anonymous Emailer 2008-08-07 05:45:32 UTC
Reply-To: oliver@neukum.org

Am Donnerstag 07 August 2008 13:44:41 schrieb bugme-daemon@bugzilla.kernel.org:
> http://bugzilla.kernel.org/show_bug.cgi?id=11263
> 
> 
> 
> 
> 
> ------- Comment #6 from alan-jenkins@tuffmail.co.uk  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() ?

	Regards
		Oliver

Comment 8 Alan Jenkins 2008-08-07 06:31:50 UTC
"video4linux video0: parent 1-8:1.0 is sleeping (status 5), will not add"

5 == DPM_OFF
Comment 9 Alan Stern 2008-08-07 07:30:17 UTC
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.
Comment 10 Rafael J. Wysocki 2008-08-08 11:41:39 UTC
*** Bug 11284 has been marked as a duplicate of this bug. ***
Comment 11 Rafael J. Wysocki 2008-08-08 15:55:26 UTC
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.
Comment 12 Alan Stern 2008-08-11 12:48:38 UTC
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.
Comment 13 Alan Jenkins 2008-08-12 03:08:21 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.