Re: Faking usb autosuspend out for uvc and cdc_acm

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

 



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.

> 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?

> Yes, I think the real solution is to provide "real" autosuspend support
> for the cdc_acm and uvc drivers, right?  But I originally approached
> this as a, "do this quick hack for now" type fix, which seems to have
> taken probably much longer than just adding autosuspend support to the
> drivers :(

Even with "real" autosuspend support (which uvc should have, judging by 
support_autosuspend being set to 1) you still need to have something 
that indicates to the core that this specific device can be 
autosuspended.

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
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