<[email protected]>
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Sorry=2C I don't know why my format always error.
>
>>
>> On Tuesday 15 September 2009 10:01:03 Bo Liu wrote:
>>> Hi=3D2C
>>>
>>> I found a problem when using my webcam. First=3D2C it's ok=3D2C but aft=
er I =3D
> unplug
>>> it. Systerm call poll() will not return.
>>>
>>> I looked at the src code=3D2C and found that uvc_queue_poll() always re=
tur=3D
> n 0=3D2C
>>> it didn't know the webcam have unpluged at that time.
>>>
>>> And I saw in funtion uvc_video_complete()=3D2C if urb->status is
>>> -ESHUTDOWN=3D2Cuvc_queue_cancel(queue=3D2C urb->status =3D3D=3D3D -ESHU=
TDOWN)=3D3B=3D
> will be
>>> called.
>>
>> That's right=3D2C and then uvc_queue_poll() should return POLLERR=3D2C m=
aking=3D
> poll()
>> return.
>>
>>> But=3D2C if just when in uvc_video_complete()> usb_submit_urb() =3D2C t=
he we=3D
> bcam is
>>> unpluged=3D2C the usb_submit_urb() will failed=3D2C but just with a pri=
ntk. =3D
> Won't
>>> call uvc_queue_cancel(). So=3D2C uvc_queue_poll() will always return 0.=
An=3D
> d=3D2C I
>>> add uvc_queue_cancel() after usb_submit_urb() failed=3D2Cerverything is=
ok=3D
> .
>>>
>>> Is this a bug ?
>>
>> This is weird. The uvcvideo driver submits several URBs=3D2C so even if =
the=3D
> device
>> is disconnected during the completion handler=3D2C the next URBs should =
get=3D
> a -
>> ESHUTDOWN status (at least with EHCI USB controllers).
>>
>> Are you using the latest driver ? What status do you get when the comple=
t=3D
> ion
>> handler is called for the next URB after usb_submit_urb() returns -ESHUT=
D=3D
> OWN ?
>> What USB controller are you using ?
> =3D20
> The driver version is about last month.
> The status sometimes is -ESHUTDOWN then uvc_queue_poll() can return POLLE=
RR=3D
> .
> But most of the time urb->status is 0 and I got several "Failed to resubm=
it=3D
> =3D20
> video URB (-19)" error.
> So I must add uvc_queue_cancel() to make poll() alwasy can return.
>
>> 716 if ((ret =3D3D usb_submit_urb(urb=3D2CGFP_ATOMIC)) < 0) {
>> //added
>> uvc_queue_cancel()
>> 717 uvc_printk(KERN_ERR=3D2C "Failed to resubmit video URB (%d).\n"
>> 718 ret)=3D3B
>> 719 }
>
> usb controller is intel's ECHI.
>
>
>>
>>> Funtions uvc_video_complete():
>>>
>>> 716 if ((ret =3D3D usb_submit_urb(urb=3D2C GFP_ATOMIC)) < 0) {
>>> 717 uvc_printk(KERN_ERR=3D2C "Failed to resubmit video URB (%d).\n"=3D2=
C
>>> 718 ret)=3D3B
>>> 719 }
>> =0A=
_________________________________________________________________=0A=
More than messages=96check out the rest of the Windows Live=99.=0A=
http://www.microsoft.com/windows/windowslive/=
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel