Using actual_length for error checks on bulk and isoc urbs?

Stanislaw Gruszka stf_xl at wp.pl
Sun Nov 20 16:47:33 EST 2005


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?

__
Staszek Gruszka




More information about the Usbatm mailing list