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

matthieu castet castet.matthieu at free.fr
Thu Mar 31 12:55:49 EST 2005


Hi Roman,
Roman Kagan wrote:
> On Wed, Mar 30, 2005 at 07:26:37PM +0200, matthieu castet wrote:
> 
>>Roman Kagan wrote:
>>
>>>On Tue, Mar 29, 2005 at 04:04:45PM +0400, Roman Kagan wrote:
>>>for (i = 0; i < num_rcv_urbs + num_snd_urbs; i++) {
>>>		struct usbatm_transceiver *trx = instance->transceivers + i;
>>>		u8 *buffer;
>>>+		unsigned int iso_packets = 0, iso_size = 0;
>>>		trx->channel = i < num_rcv_urbs ? &instance->rx_channel : 
>>>		&instance->tx_channel;
>>>
>>>		buffer = kmalloc(trx->channel->buf_size, GFP_KERNEL);
>>>@@ -1112,7 +1124,15 @@
>>>		}
>>>		memset(buffer, 0, trx->channel->buf_size);
>>>
>>>-		trx->urb = usb_alloc_urb(0, GFP_KERNEL);
>>>+		if (usb_pipeisoc(trx->urb->pipe)) {
>>
>>                                  ******
>>using trx->urb before it is allocated won't work...
> 
> 
> Damn, I copied it verbatim from usbatm_rx_process()...  Sorry, it should
> have been trx->channel->endpoint.  Thanks for spotting this!
> 
> 
It don't work very well : 170 kB/s instead of 700kB/s

I was using 503 for the buff size.

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
Mar 31 19:47:14 localhost kernel: /home/mat/driver/usbatm/usbatm.c: 
usbatm_check_usb_errcode: channel 0xf58912a0, errcode 0
in my log (15317 times)

Also I have bogus pdu_length and packet failed crc check with your code 
(I don't have these errors with my iso code).

Matthieu

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



More information about the Usbatm mailing list