speedtch usbatm.c,1.38,1.39

Duncan Sands duncan at infradead.org
Fri May 6 05:05:20 EDT 2005


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv22837

Modified Files:
	usbatm.c 
Log Message:
Don't drop urbs we already filled.


Index: usbatm.c
===================================================================
RCS file: /home/cvs/speedtch/usbatm.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- usbatm.c	5 May 2005 09:05:56 -0000	1.38
+++ usbatm.c	6 May 2005 09:05:17 -0000	1.39
@@ -237,9 +237,8 @@
 		atm_dbg(channel->usbatm, "%s: trx 0x%p urb 0x%p submission failed (%d)!\n",
 			__func__, trx, trx->urb, ret);
 
-		trx->urb->status = ret;
-
 		/* consider all errors transient and return the buffer back to the queue */
+		trx->urb->status = -EAGAIN;
 		spin_lock_irq(&channel->lock);
 
 		/* must add to the front when sending; doesn't matter when receiving */
@@ -532,7 +531,8 @@
 			if (!tx)
 				break;		/* no more senders */
 			buffer = tx->urb->transfer_buffer;
-			num_written = 0;
+			num_written = (tx->urb->status == -EAGAIN) ?
+				tx->urb->transfer_buffer_length : 0;
 		}
 
 		num_written += usbatm_write_cells(instance, skb,




More information about the Usbatm-commits mailing list