rx_process for isoc

Stanislaw Gruszka stf_xl at wp.pl
Fri Nov 18 11:04:58 EST 2005


> that would work too, but in the case when data is coming in fast,
> so all iso packets are full, you have to do a partial copy to
> cell_buf for *every* iso packet (at least with the speedtouch)
> because the packet length is not divisible by the stride (for
> the speedtouch, the stride is 53, and the packet size is 640
> or 960).  Maybe it should be profiled.
AFIAK when all iso packets are full then urb->actual_length 
== packet_size*num_packets == rx_channel.buf_size. 

if (usb_pipeisoc(urb->pipe)) {
	if (urb->actual_length == instance->rx_channel.buf_size)
		urbatm_extract_cells(instance, urb->transfer_buffer, urb->actual_lenght)	
	else
 		for (i = 0; i < urb->number_of_packets; i++) {

The only problem here is if assumption 

len = 0
for (i = 0; i < urb->number_of_packets; i++)
	len += urb->iso_fame_desc[i].actual_length
ASSERT(urb->actual_length == len);

is true and actual_length == 0 when error occurs. 
USB guys should know this.

__
Staszek




More information about the Usbatm mailing list