[RFC] [PATCH] usbatm.[ch]: multiple changes

Roman Kagan rkagan at mail.ru
Thu Mar 31 15:30:05 EST 2005


On Thu, Mar 31, 2005 at 07:55:49PM +0200, matthieu castet wrote:
> It don't work very well : 170 kB/s instead of 700kB/s

So it didn't crash - that's already a good news :)

> I was using 503 for the buff size.

Hmm, if you use 1007 bytes == 19 cells per iso frame (you don't use
padding, do you?) and want 16 iso frames per urb you need buffer size of
19 * 16 = 304.  503 shouldn't be a problem too, however, from the
aesthetic POV I'd suggest a multiple of iso frame size, say 494 or 513.

> There lot's of
> Mar 31 19:47:14 localhost kernel: /home/mat/driver/usbatm/usbatm.c: 
> usbatm_check_usb_errcode: channel 0xf58912a0, errcode -84

Yep, that's the notorious -EILSEQ you were seeing before...

> Also I have bogus pdu_length and packet failed crc check with your code 

Probably the same reason...

> PS : ask me if you want information, debug log, ...

Thanks!  For now, can you please try your own workaround, so that the
whole thing becomes functionally equivalent to your patch:


--- usbatm.c.eilseq	2005-03-31 12:08:06.000000000 +0400
+++ usbatm.c	2005-04-01 00:18:05.000000000 +0400
@@ -231,10 +231,11 @@ static int usbatm_check_usb_errcode(stru
 {
 	dbg("usbatm_check_usb_errcode: channel 0x%p, errcode %d", channel, errcode);
 
-	if (likely(!errcode)) {
+	if (likely(!errcode || 
+		   (usb_pipeisoc(channel->endpoint) && errcode == -EILSEQ))) {
 		/* reset allowed errors counter */
 		atomic_set(&channel->num_allowed_errors, USBATM_MAX_ERRORS);
-		return errcode;
+		return 0;
 	}
 
 	if (atomic_dec_and_test(&channel->num_allowed_errors)) {



More information about the Usbatm mailing list