speedtch usbatm.c,1.26,1.27

Roman Kagan rkagan at mail.ru
Tue May 3 09:43:01 EDT 2005


On Tue, May 03, 2005 at 10:34:37AM +0100, Duncan Sands wrote:
> --- usbatm.c	3 May 2005 08:41:56 -0000	1.26
> +++ usbatm.c	3 May 2005 09:34:34 -0000	1.27
> @@ -241,7 +241,7 @@
>  
>  		/* consider all errors transient and return the buffer back to the queue */
>  		spin_lock_irq(&channel->lock);
> -		list_add(&trx->list, &channel->list);
> +		list_add_tail(&trx->list, &channel->list);
>  		spin_unlock_irq(&channel->lock);
>  
>  		/* make sure the channel doesn't stall */

This one (in usbatm_submit_transceiver()) breaks the initial design.
The point is that for tx path, when the submission fails, you've already
filled the transceiver with data, so you want to return it to the head
of the queue and attempt to resubmit on the next iteration, otherwise
the data may go out of sequence.

Cheers,
  Roman.



More information about the Usbatm mailing list