Re: Faking usb autosuspend out for uvc and cdc_acm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 4 Dec 2009, Matthew Garrett wrote:

> On Wed, Nov 25, 2009 at 02:33:38PM -0800, Greg KH wrote:
> 
> > 	void usb_device_autosuspend_enable(struct usb_device *udev)
> > 	{
> > 		udev->autosuspend_disabled = 0;
> > 		udev->autoresume_disabled = 0;
> > 		usb_external_suspend_device(udev, PMSG_USER_SUSPEND);
> > 	}
> 
> Whoops! Yes, that's an obvious error.

Matthew: FYI, I have been working on a patch series converting USB over
to the runtime PM framework.  One of the patches adds "official"  
usb_enable_autosuspend() and usb_disable_autosuspend() routines.

> > But, again, in testing, this didn't seem to actually make any
> > difference.  Well, it did for about 50% of the time the machine was
> > tested, but not the other 50%.  The other 50% always worked when echoing
> > "auto" to the power/level file.
> 
> When it's in the "failing" case, is active_duration continuing to 
> increase? If so, that would indicate a failure in the autosuspend core 
> code. On a hunch, does running lsusb turn a failing case into a working 
> one?

Further testing (later on in the thread) showed that the device _was_
being autosuspended correctly.  But sometimes the power consumption
would differ, for no apparent reason.  I don't think the uvcvideo
driver is involved or at fault.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux