speedtch usbatm.c,1.26,1.27

matthieu castet castet.matthieu at free.fr
Sun May 15 16:37:39 EDT 2005


Roman Kagan wrote:
> On Wed, May 11, 2005 at 08:21:14PM +0200, matthieu castet wrote:
> 
>>matthieu castet wrote:
>>
>>>isn't there something wrong about iso pipe in current cvs :
>>>
>>>usbatm_usb_probe calls bind, then init rx_channel.endpoint and 
>>>tx_channel.endpoint to bulk pipe and finaly test if there are iso pipe.
>>>
>>>How the sub-driver is supposed to choose iso pipe ?
>>>
>>
>>any info about this ?
>>
>>It could be good to fix it before inclusion in kernel ?
> 
> 
> I can only humbly repeat my suggestion to move channel's enpoints
> initialization back to before .bind(), to allow the subdriver to
> override it, but apparently Duncan doesn't like this approach...
> 
If he don't like it, why don't use something like that :
it could be statiquely initialized, changed in usb_probe and in
usbatm_bind .

Matthieu

-------------- next part --------------
Index: usbatm.c
===================================================================
RCS file: /home/cvs/usbatm/usbatm.c,v
retrieving revision 1.44
diff -u -r1.44 usbatm.c
--- usbatm.c	11 May 2005 14:59:39 -0000	1.44
+++ usbatm.c	15 May 2005 19:44:49 -0000
@@ -1019,7 +1019,10 @@
 	usbatm_init_channel(&instance->tx_channel);
 	tasklet_init(&instance->rx_channel.tasklet, usbatm_rx_process, (unsigned long)instance);
 	tasklet_init(&instance->tx_channel.tasklet, usbatm_tx_process, (unsigned long)instance);
-	instance->rx_channel.endpoint = usb_rcvbulkpipe(usb_dev, driver->in);
+	if (driver->use_iso)
+		instance->rx_channel.endpoint = usb_rcvisocpipe(usb_dev, driver->in);
+	else
+		instance->rx_channel.endpoint = usb_rcvbulkpipe(usb_dev, driver->in);
 	instance->tx_channel.endpoint = usb_sndbulkpipe(usb_dev, driver->out);
 	instance->rx_channel.stride = ATM_CELL_SIZE + driver->rx_padding;
 	instance->tx_channel.stride = ATM_CELL_SIZE + driver->tx_padding;
Index: usbatm.h
===================================================================
RCS file: /home/cvs/usbatm/usbatm.h,v
retrieving revision 1.18
diff -u -r1.18 usbatm.h
--- usbatm.h	10 May 2005 21:15:58 -0000	1.18
+++ usbatm.h	15 May 2005 19:44:50 -0000
@@ -118,6 +118,7 @@
 
 	unsigned rx_padding;
 	unsigned tx_padding;
+	int use_iso;
 };
 
 extern int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,



More information about the Usbatm mailing list