Re: [PATCH] uvcvideo: add fix suspend/resume quirk for Microdia camera

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

 



Hi,

On Wed, Jul 13, 2011 at 11:59 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 13 Jul 2011, Ming Lei wrote:

>> Almost same.
>
> Come on.  "Almost same" means they are different.  That difference is
> clearly the important thing you need to track down.

I didn't say "entirely same" because we can't trace the packets via usbmon
during system resume, but we can do it during runtime resume.

In fact, except for above, the packets captured from interrupt ep and control ep
are completely same.  Also all functions in uvc (rpm, system)resume path return
successfully.

>
>>  If I add USB_QUIRK_RESET_RESUME quirk for the device,
>> the stream data will not be received from the device in runtime pm case,
>> same with that in system suspend.
>
> uvcvideo should be able to reinitialize the device so that it works
> correctly following a reset.  If the device doesn't work then uvcvideo
> has a bug in its reset_resume handler.

This also indicates the usb reset during resume does make the uvc device
broken.

>> Maybe buggy BIOS makes root hub send reset signal to the device during
>> system suspend time, not sure...
>
> That's entirely possible.

The below quirk  fixes the issue now.

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 81ce6a8..93c6fa2 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -82,6 +82,9 @@ static const struct usb_device_id usb_quirk_list[] = {
 	/* Broadcom BCM92035DGROM BT dongle */
 	{ USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },

+	/* Microdia uvc camera */
+	{ USB_DEVICE(0x0c45, 0x6437), .driver_info = USB_QUIRK_RESET_MORPHS },
+
 	/* Action Semiconductor flash disk */
 	{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
 			USB_QUIRK_STRING_FETCH_255 },


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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux