Am Mittwoch, 16. Juli 2003 09:59 schrieb Detlef Schmicker \(Siebertz Electronic GmbH\):
> Hi,
>
> I just want to add some experience I did in testing. I am not so
> deep inside for code analysis at the moment.
>
> 1.) pwc on 2.6.0-test1-ac1: It does not stop when loading the system, but
> I had a stop after a number of hours (3). The received counter at
> closing the device seems not to bad (300000 after 17 hours at 5 fps),
> but
> I have 250000 dumped frames and 200 frames with errors. The Java Media
> Framework
> does not receive the new frames anymore.
OK, looks like David is right. The improved IDE code hides a bug.
Could you apply the included patch to 2.6.0-test and really torture it?
Regards
Oliver
You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.
===================================================================
[EMAIL PROTECTED], 2003-07-16 10:48:53+02:00, [EMAIL PROTECTED]
- resubmission in some error cases
pwc-if.c | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.c Wed Jul 16 10:50:17 2003
+++ b/drivers/usb/media/pwc-if.c Wed Jul 16 10:50:17 2003
@@ -1,4 +1,4 @@
-/* Linux driver for Philips webcam
+/* Linux driver for Philips webcam
USB and Video4Linux interface part.
(C) 1999-2002 Nemosoft Unv.
@@ -385,7 +385,7 @@
the user program. The first scheme involves the ISO buffers (called thus
since they transport ISO data from the USB controller), and not really
interesting. Suffices to say the data from this buffer is quickly
- gathered in an interrupt handler (pwc_isoc_handler) and placed into the
+ gathered in an interrupt handler (pwc_isoc_handler) and placed into the
frame buffer.
The frame buffer is the second scheme, and is the central element here.
@@ -544,7 +544,7 @@
Trace(TRACE_SEQUENCE, "Decompressing frame %d\n",
pdev->read_frame->sequence);
#endif
/* Decompression is a lenghty process, so it's outside of the
lock.
- This gives the isoc_handler the opportunity to fill more
frames
+ This gives the isoc_handler the opportunity to fill more
frames
in the mean time.
*/
spin_unlock_irqrestore(&pdev->ptrlock, flags);
@@ -610,7 +610,7 @@
Err("isoc_handler() called with NULL device?!\n");
return;
}
-#ifdef PWC_MAGIC
+#ifdef PWC_MAGIC
if (pdev->magic != PWC_MAGIC) {
Err("isoc_handler() called with bad magic!\n");
return;
@@ -622,7 +622,7 @@
}
if (urb->status != -EINPROGRESS && urb->status != 0) {
char *errmsg;
-
+
errmsg = "Unknown";
switch(urb->status) {
case -ENOSR: errmsg = "Buffer error (overrun)";
break;
@@ -631,9 +631,12 @@
case -EPROTO: errmsg = "Bit-stuff error (bad
cable?)"; break;
case -EILSEQ: errmsg = "CRC/Timeout"; break;
case -ETIMEDOUT: errmsg = "NAK (device does not
respond)"; break;
+ Trace(TRACE_FLOW, "pwc_isoc_handler()
called with status %d [%s].\n", urb->status, errmsg);
+ goto resub;
+ case -ESHUTDOWN:
+ /* somebody pulled the controller card
*/
+ return;
}
- Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n",
urb->status, errmsg);
- return;
}
fbuf = pdev->fill_frame;
@@ -647,7 +650,7 @@
/* vsync: 0 = don't copy data
1 = sync-hunt
- 2 = synched
+ 2 = synched
*/
/* Compact data */
for (i = 0; i < urb->number_of_packets; i++) {
@@ -674,18 +677,18 @@
} /* ..flen > 0 */
if (flen < pdev->vlast_packet_size) {
- /* Shorter packet... We probably have the end of an
image-frame;
+ /* Shorter packet... We probably have the end of an
image-frame;
wake up read() process and let select()/poll() do
something.
- Decompression is done in user time over there.
+ Decompression is done in user time over there.
*/
if (pdev->vsync == 2) {
- /* The ToUCam Fun CMOS sensor causes the
firmware to send 2 or 3 bogus
- frames on the USB wire after an exposure
change. This conditition is
+ /* The ToUCam Fun CMOS sensor causes the
firmware to send 2 or 3 bogus
+ frames on the USB wire after an exposure
change. This conditition is
however detected in the cam and a bit is
set in the header.
*/
if (pdev->type == 730) {
unsigned char *ptr = (unsigned char
*)fbuf->data;
-
+
if (ptr[1] == 1 && ptr[0] & 0x10) {
#if PWC_DEBUG
Debug("Hyundai CMOS sensor
bug. Dropping frame %d.\n", fbuf->sequence);
@@ -706,10 +709,10 @@
Info("Image is
normal.\n");
}
pdev->vmirror = ptr[0] & 0x03;
- /* Sometimes the trailer of the 730 is
still sent as a 4 byte packet
+ /* Sometimes the trailer of the 730 is
still sent as a 4 byte packet
after a short frame; this condition
is filtered out specifically. A 4 byte
frame doesn't make sense anyway.
- So we get either this sequence:
+ So we get either this sequence:
drop_bit set -> 4 byte frame
-> short frame -> good frame
Or this one:
drop_bit set -> short frame ->
good frame
@@ -733,7 +736,7 @@
else {
/* Send only once per EOF */
awake = 1; /* delay wake_ups */
-
+
/* Find our next frame to
fill. This will always succeed, since we
* nick a frame from either
empty or full list, but if we had to
* take it from the full list,
it means a frame got dropped.
@@ -766,11 +769,12 @@
if (iso_error < 20)
Trace(TRACE_FLOW, "Iso frame %d of USB has error
%d\n", i, fst);
}
-#endif
+#endif
}
if (awake)
wake_up_interruptible(&pdev->frameq);
+resub:
urb->dev = pdev->udev;
i = usb_submit_urb(urb, GFP_ATOMIC);
if (i != 0)
===================================================================
This BitKeeper patch contains the following changesets:
1.2132
## Wrapped with gzip_uu ##
begin 664 bkpatch26292
M'XL(`,H1%3\``[U6[T_;2!#]'/\5HZ)*T!)GUQO_2*I4T([EMAIL PROTECTED]'">T
MMM>)A>UU=VUHI/SQ-[M.X4!<[ZXGG4$99W?F[9LW;P5[<*F%&O=DD=\)Y>S!
M9ZF;<0_?RS85E5N)]K8M7:E6N'<A)>X-UK([EMAIL PROTECTED]@L%1"[EMAIL PROTECTED]
MP`T][E&7/:PTFUJ,>Q<GGR[/CB\<9S*!Z9I7*[$0#4PF3GQ[E+:B<&^5Y&MS
MV/9A>^L10BGU?,+\@/I;+V)LN*4!B5-\3;UPE,7!R%DIL3KJRA-9/BUG),1\
MYD<DVGKX1IP94->CS`/"!B0<T``H&0^CL<_>$F],"'3=';[EMAIL PROTECTED]"?.!_CO
MG*=.`GU00K=QF6N=RPKR"C2J"T(IJ2#A6FCG%_"\*`J<^:-F3O]?/HY#.''>
MOT`Z5:93/6AU;,;8SS,W>>0_)",:HFBCD&YYXH5A$B5Q([EMAIL PROTECTED]'(CU!+46:
M\R?8W4"B841'6Q)Y'K6.^.N:ERWR\\R?N^7OV`8&BX6(1VCD1=8^0_;</'3T
M#\SCH7MH^/_:QRI\#GUU;W_1#?,?B/T3WII1H,ZI^1B\@;.\:K_M\"%#&O-U
M7N2UAGL1)[QT9BR*3'H7`&#%F[50(C7LN>FA0?IMW0#JD18(LH_4;G(MDYO=
MR@'FI5`7/+%5C01$<&;^,#3`7>CU>HB]7.<:5DA%FQ3X,XA=D'4M5=-6>;,!
MA,GRHH!2*@&9XB6*-PLH,YA=V,NS5&0POYK>?#G^=#K%;<^WVS9<XPMCX)NS
M\5DJY+>_O#B>GMQ\/#N_.H17SQO9/\`A%05V<9\W:]`-;UH-KU/X[;7^W;VN
M7AU"J^+^^V[CT,RUU*N#=[L35A(Y6P/8%3-OZ)\L/[EMAIL PROTECTED]
MIANH6WN::3V15:-D891(N$KAS6"7KT33JNH=-L=\\##XQ/[EMAIL PROTECTED]@P`;VI
MDK5(,2FTVG=A=^IBC=HB?,V36]&[EMAIL PROTECTED]&YSNG;!$!,Y29G;T)5^)
MOI7>'!^..LC1#A+/G`F\KS6VW-E=0RHK88S3:C/1'+TO[[K9*N$B1N1A"Z=!
MQ#!\5V.)AR[EY927\+&M8/KE?`%:5-I>&03JO)+EJKSG:`746!N.'F`"@UBN
M6MUA(:'.)X!D3,[EMAIL PROTECTED]'EL2W6NH65Q)[N]W.D:A]FC?X8YLP-.V5
MZ,*U,PN);;T+#U-<X!1-BQV_1O'<#`^E,U]#1HP>NC$61KX-<`T<AA!O&K$;
M`0)3SP+;T/O>Q$+BY805_BT6N5$.`0V4^-J**A%C+&.!+;/!\`LZ?C;LH3AY
CAM]"<T>L'<>/_PN@/9);W9:[EMAIL PROTECTED]@:.G\`FE":*G,(````
`
end
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel