Re: usb autosuspend is history after S2R (also on 2.6.31; UVC?)

From: Andreas Mohr
Date: Wed Sep 16 2009 - 14:19:24 EST


Hi,

On Tue, Sep 15, 2009 at 09:48:28PM +0200, Oliver Neukum wrote:
> Am Dienstag, 15. September 2009 20:51:45 schrieb Andreas Mohr:
>
> > So, does the uvc driver need a bit of handholding here?
> > It likely shouldn't simply forget about its autosuspend status after
> > resume...
>
> Can you please provide what you get when you read the "level" file
> of the device's power directory?

After boot:

# cat 5-5/product
Acer Crystal Eye webcam
# cat 5-5/power/level
on

After re-enabling disabled /etc/rc.local autosuspend tweaks:

# cat 5-5/power/level
auto

> Secondly, please verify, that it works before the STR cycle and post

It does:

Recent USB suspend statistics
Active Device name
0.0% USB device 5-5 : Acer Crystal Eye webcam (SuYin)
0.0% USB device usb5 : EHCI Host Controller (Linux 2.6.31 ehci_hcd)
0.0% USB device usb4 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb3 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb2 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb1 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)

> a syslog of a suspend/resume cycle with CONFIG_USB_DEBUG and
> only this device attached if possible. Thirdly, please verify that only
> uvc is affected.

Hmmmm...

I just did the first S2R after boot, and the result is this:

Recent USB suspend statistics
Active Device name
0.0% USB device 5-5 : Acer Crystal Eye webcam (SuYin)
0.0% USB device usb5 : EHCI Host Controller (Linux 2.6.31 ehci_hcd)
0.0% USB device usb4 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb3 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb2 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
0.0% USB device usb1 : UHCI Host Controller (Linux 2.6.31 uhci_hcd)
# cat 5-5/power/level
auto

Weird. Either it was always working and I'm just _very_ wrong,
or it's erratic and gets reset every couple S2Rs only.

Anyway, doesn't change the fact that the r8169 WOL PHY setting is toast
after every S2R as well ;)
# ethtool -s eth0 wol d
# ethtool eth0
...
Wake-on: d
...

which then reverts to
# ethtool eth0
...
Wake-on: g
...
thus wasting a wee bit of power(, too).

> > Or would Matthew's uvc autosuspend patch
> > http://osdir.com/ml/fedora-extras-commits/2009-07/msg06079.html
> > help here?
>
> Please test it. It shouldn't work, but if it works there's a fundamental
> flaw.

Hmm, rebuild (of patch plus CONFIG_USB_DEBUG) would take >> 2 hours,
will have to wait until later.

Thanks,

Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/