* gspca_pac7302: sporatdic problem when plugging the device @ 2010-01-10 16:58 Németh Márton 2010-01-10 19:48 ` Jean-Francois Moine 0 siblings, 1 reply; 6+ messages in thread From: Németh Márton @ 2010-01-10 16:58 UTC (permalink / raw) To: Jean-Francois Moine; +Cc: V4L Mailing List Hi, I have sporadic problem with Labtec Webcam 2200 (0x093a:0x2626). I'm using gspca_pac7302 driver from http://linuxtv.org/hg/~jfrancois/gspca/ rev 13915 on top of Linux kernel 2.6.32. I executed the following command in an xterm window: $ while true; do ./svv; done Then I plugged and unplugged the device 16 times. When I last plugged the device I get the following error in the dmesg: [32393.421313] gspca: probing 093a:2626 [32393.426193] gspca: video0 created [32393.426958] gspca: probing 093a:2626 [32393.426968] gspca: Interface class 1 not handled here [32394.005917] pac7302: reg_w_page(): Failed to write register to index 0x49, value 0x0, error -71 [32394.067799] gspca: set alt 8 err -71 [32394.090792] gspca: set alt 8 err -71 [32394.118159] gspca: set alt 8 err -71 The 17th plug was working correctly again. I executed this test on an EeePC 901. This driver version contains the msleep(4) in the reg_w_buf(). However, here the reg_w_page() fails, which does not have msleep() inside. I don't know what is the real problem, but I am afraid that slowing down reg_w_page() would make the time longer when the device can be used starting from the event when it is plugged. Regards, Márton Németh ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gspca_pac7302: sporatdic problem when plugging the device 2010-01-10 16:58 gspca_pac7302: sporatdic problem when plugging the device Németh Márton @ 2010-01-10 19:48 ` Jean-Francois Moine 2010-01-10 20:28 ` Németh Márton 0 siblings, 1 reply; 6+ messages in thread From: Jean-Francois Moine @ 2010-01-10 19:48 UTC (permalink / raw) To: Németh Márton; +Cc: V4L Mailing List On Sun, 10 Jan 2010 17:58:58 +0100 Németh Márton <nm127@freemail.hu> wrote: > Then I plugged and unplugged the device 16 times. When I last plugged > the device I get the following error in the dmesg: > > [32393.421313] gspca: probing 093a:2626 > [32393.426193] gspca: video0 created > [32393.426958] gspca: probing 093a:2626 > [32393.426968] gspca: Interface class 1 not handled here > [32394.005917] pac7302: reg_w_page(): Failed to write register to > index 0x49, value 0x0, error -71 > [32394.067799] gspca: set alt 8 err -71 > [32394.090792] gspca: set alt 8 err -71 > [32394.118159] gspca: set alt 8 err -71 > > The 17th plug was working correctly again. I executed this test on an > EeePC 901. > > This driver version contains the msleep(4) in the reg_w_buf(). > However, here the reg_w_page() fails, which does not have msleep() > inside. I don't know what is the real problem, but I am afraid that > slowing down reg_w_page() would make the time longer when the device > can be used starting from the event when it is plugged. Hi again, I don't understand what you mean by: > This driver version contains the msleep(4) in the reg_w_buf(). > However, here the reg_w_page() fails, which does not have msleep() > inside. Indeed the delay will slow down the webcam start (256 * 4 ms = 1s). If having a delay fixes the problem, then, as the error always occurs at the same index 0x49 (3 reports), a single delay could be set before writing to this index. Do you want I code this for test? Regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gspca_pac7302: sporatdic problem when plugging the device 2010-01-10 19:48 ` Jean-Francois Moine @ 2010-01-10 20:28 ` Németh Márton 2010-01-11 8:09 ` Jean-Francois Moine 2010-01-11 8:10 ` Jean-Francois Moine 0 siblings, 2 replies; 6+ messages in thread From: Németh Márton @ 2010-01-10 20:28 UTC (permalink / raw) To: Jean-Francois Moine; +Cc: V4L Mailing List Jean-Francois Moine wrote: > On Sun, 10 Jan 2010 17:58:58 +0100 > Németh Márton <nm127@freemail.hu> wrote: > >> Then I plugged and unplugged the device 16 times. When I last plugged >> the device I get the following error in the dmesg: >> >> [32393.421313] gspca: probing 093a:2626 >> [32393.426193] gspca: video0 created >> [32393.426958] gspca: probing 093a:2626 >> [32393.426968] gspca: Interface class 1 not handled here >> [32394.005917] pac7302: reg_w_page(): Failed to write register to >> index 0x49, value 0x0, error -71 >> [32394.067799] gspca: set alt 8 err -71 >> [32394.090792] gspca: set alt 8 err -71 >> [32394.118159] gspca: set alt 8 err -71 >> >> The 17th plug was working correctly again. I executed this test on an >> EeePC 901. >> >> This driver version contains the msleep(4) in the reg_w_buf(). >> However, here the reg_w_page() fails, which does not have msleep() >> inside. I don't know what is the real problem, but I am afraid that >> slowing down reg_w_page() would make the time longer when the device >> can be used starting from the event when it is plugged. > > Hi again, > > I don't understand what you mean by: >> This driver version contains the msleep(4) in the reg_w_buf(). >> However, here the reg_w_page() fails, which does not have msleep() >> inside. I tought that the msleep(4) call introduced recently fixed the plug-in problem. It seems I misunderstood something. > Indeed the delay will slow down the webcam start (256 * 4 ms = 1s). > > If having a delay fixes the problem, then, as the error always occurs > at the same index 0x49 (3 reports), a single delay could be set before > writing to this index. Do you want I code this for test? I tested the behaviour a little bit more. Out of 100 plug-ins: OK: 81 times "pac7302: reg_w_page(): Failed to write register to index 0x49, value 0x0, error -71": 19 times Other error message I haven't got, so 19% of the time writing to register index 0x49 fails in reg_w_page(). So let's try doing fixing the way you described. If you send me a patch I can test it. Regards, Márton Németh ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gspca_pac7302: sporatdic problem when plugging the device 2010-01-10 20:28 ` Németh Márton @ 2010-01-11 8:09 ` Jean-Francois Moine 2010-01-11 8:10 ` Jean-Francois Moine 1 sibling, 0 replies; 6+ messages in thread From: Jean-Francois Moine @ 2010-01-11 8:09 UTC (permalink / raw) To: Németh Márton, Stéphane Marguet; +Cc: V4L Mailing List On Sun, 10 Jan 2010 21:28:29 +0100 Németh Márton <nm127@freemail.hu> wrote: > I tested the behaviour a little bit more. Out of 100 plug-ins: > > OK: 81 times > "pac7302: reg_w_page(): Failed to write register to index 0x49, value > 0x0, error -71": 19 times > > Other error message I haven't got, so 19% of the time writing to > register index 0x49 fails in reg_w_page(). So let's try doing fixing > the way you described. If you send me a patch I can test it. In some usbsnoop files I have, the index 0x48 is not loaded. May you try the attached patch (skip the index 0x48 and remove the delay). (Stéphane, est-ce que tu peux voir aussi ce que ça donne chez toi?) Regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gspca_pac7302: sporatdic problem when plugging the device 2010-01-10 20:28 ` Németh Márton 2010-01-11 8:09 ` Jean-Francois Moine @ 2010-01-11 8:10 ` Jean-Francois Moine 2010-01-11 18:07 ` Németh Márton 1 sibling, 1 reply; 6+ messages in thread From: Jean-Francois Moine @ 2010-01-11 8:10 UTC (permalink / raw) To: Németh Márton, Stéphane Marguet; +Cc: V4L Mailing List [-- Attachment #1: Type: text/plain, Size: 365 bytes --] Sorry, I forgot to attach the patch. > In some usbsnoop files I have, the index 0x48 is not loaded. May you > try the attached patch (skip the index 0x48 and remove the delay). > > (Stéphane, est-ce que tu peux voir aussi ce que ça donne chez toi?) Regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ [-- Attachment #2: pac7302.pat --] [-- Type: application/octet-stream, Size: 826 bytes --] diff -r 8c11be4edf33 linux/drivers/media/video/gspca/pac7302.c --- a/linux/drivers/media/video/gspca/pac7302.c Sun Jan 10 20:36:53 2010 +0100 +++ b/linux/drivers/media/video/gspca/pac7302.c Mon Jan 11 09:01:24 2010 +0100 @@ -388,7 +388,7 @@ 0xa4, 0xb8, 0xe0, 0x2a, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xf2, 0x1f, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x10, 0x00, 0x00, + SKIP, 0x00, 0x00, 0xc0, 0xc0, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, 0x03, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -419,7 +419,6 @@ PDEBUG(D_ERR, "reg_w_buf(): " "Failed to write registers to index 0x%x, error %i", index, ret); - msleep(4); /* don't go too quickly */ return ret; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gspca_pac7302: sporatdic problem when plugging the device 2010-01-11 8:10 ` Jean-Francois Moine @ 2010-01-11 18:07 ` Németh Márton 0 siblings, 0 replies; 6+ messages in thread From: Németh Márton @ 2010-01-11 18:07 UTC (permalink / raw) To: Jean-Francois Moine; +Cc: Stéphane Marguet, V4L Mailing List Jean-Francois Moine írta: > Sorry, I forgot to attach the patch. > >> In some usbsnoop files I have, the index 0x48 is not loaded. May you >> try the attached patch (skip the index 0x48 and remove the delay). 100 plug-ins out of 100 OK, no errors: I say go for this patch. I applied the patch on top of rev 14000:bc5737e0e757 from http://linuxtv.org/hg/~jfrancois/gspca/ . I tested the driver on top of 2.6.32 with Labtec Webcam 2200 (0x093a:0x2626). Tested-by: Márton Németh <nm127@freemail.hu> Thanks for the fix. Regards, Márton Németh ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-11 18:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-10 16:58 gspca_pac7302: sporatdic problem when plugging the device Németh Márton 2010-01-10 19:48 ` Jean-Francois Moine 2010-01-10 20:28 ` Németh Márton 2010-01-11 8:09 ` Jean-Francois Moine 2010-01-11 8:10 ` Jean-Francois Moine 2010-01-11 18:07 ` Németh Márton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox