usbatm xusbatm.c,1.7,1.8

Roman Kagan rkagan at mail.ru
Thu Apr 21 13:43:30 EDT 2005


On Thu, Apr 21, 2005 at 06:46:35PM +0200, Duncan Sands wrote:
> I guess the point is that an endpoint may not exist in some altsettings
> for the interface, and can exist in several.  This complicates things...

Yep, I've added the handling of this in the same fashion that you
quoted.  I've yet to figure out who's supposed to choose the right
altsetting...

> >  static int xusbatm_bind(struct usbatm_data *usbatm_instance,
> >  			struct usb_interface *intf, const struct usb_device_id *id,
> >  			int *need_heavy_init)
> 
> The logic in this routine seems convoluted.  Rather than having a
> routine that checks whether an ep is in an interface, why not have
> one that, given an ep, returns the interface containing it?  Then
> you can check whether either one (or both) equals the current intf,
> and claim the other interface if needs be.

Would it make any difference, other than adding an extra loop, or
possibly two, over interfaces?

Roman.



More information about the Usbatm mailing list