speedtch usbatm.c,1.26,1.27

Roman Kagan rkagan at mail.ru
Thu May 12 00:24:24 EDT 2005


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...

Cheers,
  Roman.


Index: usbatm.c
===================================================================
RCS file: /home/cvs/usbatm/usbatm.c,v
retrieving revision 1.44
diff -u -p -r1.44 usbatm.c
--- usbatm.c	11 May 2005 14:59:39 -0000	1.44
+++ usbatm.c	12 May 2005 04:18:49 -0000
@@ -975,6 +975,8 @@ int usbatm_usb_probe(struct usb_interfac
 
 	instance->usb_dev = usb_dev;
 	instance->usb_intf = intf;
+	instance->rx_channel.endpoint = usb_rcvbulkpipe(usb_dev, driver->in);
+	instance->tx_channel.endpoint = usb_sndbulkpipe(usb_dev, driver->out);
 
 	buf = instance->description;
 	length = sizeof(instance->description);
@@ -1019,8 +1021,6 @@ int usbatm_usb_probe(struct usb_interfac
 	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);
-	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;
 	instance->rx_channel.buf_size = rcv_buf_size * instance->rx_channel.stride;



More information about the Usbatm mailing list