Message ID | CACVXFVM=P7dongW660zmcSdapyqYz3Yr0R4DUGbQtQEKUG_tcw@mail.gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Hi, On Fri, Jul 15, 2011 at 10:27 PM, Alan Stern <stern@rowland.harvard.edu> wrote: > This is fine with me. However, it is strange that the Set-Interface > request is necessary. After being reset, the device should > automatically be in altsetting 0 for all interfaces. For uvc devices, seems it is not strange, see uvc_video_init(), which is called in .probe path and executes Set-Interface 0 first, then starts to get/set video control. thanks,
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index b6eae48..4055dfc 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c @@ -1959,8 +1959,12 @@ static int __uvc_resume(struct usb_interface *intf, int reset) } list_for_each_entry(stream, &dev->streams, list) { - if (stream->intf == intf) + if (stream->intf == intf) { + if (reset) + usb_set_interface(stream->dev->udev, + stream->intfnum, 0); return uvc_video_resume(stream); + } }