On Sun, 20 Nov 2005, Stanislaw Gruszka wrote:

> Hi
> 
> Usbatm need code to check correctness of both bulk and isoc 
> urb. Now urb->status is used howewer it seems uhci driver 
> set negative urb->status if error occurs on at least one frame, 
> even if all others are ok. (This is problem for eagle ADSL usb
> modems in isoc mode, as modem produce lot frames with 
> -EILSEQ error mixed with valid packets)
> 
> So my question is if urb->actual_length can be used for 
> check error on both isoc and bulk urbs whitout using 
> conditionals for distinguish pipes, for example:
> 
> if (likely(urb->actual_length > 0))  {
>       /* we have good bulk urb or at least one good isoc frame */
>       ...
> } else 
>       print_error(urb->status);
> 
> I think this code will work if:
> 1) for isoc urb: urb->actual_length is equal sum actual_length of all frames
> 2) if error occurs on urb/frame - actual_length is equal 0
> 
> Is 1) and 2) true?

With uhci-hcd 1) is true.

I don't understand 2).  If an error occurs in a bulk or iso URB,
urb->actual_length may still be larger than 0.  If an error occurs in an
iso frame, urb->frame_desc[i].actual_length may still be larger than 0 and
urb->frame_desc[i].status may still be 0 (since iso errors often are
undetectable).  Does that answer your question?

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to