[PATCH] xusbatm.c - Fix usb_intf_has_ep() loops and add altsetting parameter

Aurelio Arroyo listas_sk3 at yahoo.es
Wed Nov 9 18:45:44 EST 2005


Hi,

I'm testing xusbatm.c with Zyxel 630 and I need change usb_intf_has_ep().

- Fix: endpoit loop use 'i' and not 'j'

- Fix: altsetting loop don't use 'i'
		This fix output a ¿warning? at make.

- ¿ & USB_ENDPOINT_NUMBER_MASK ?
		I need delete it to find ep... 

- I add too a altsetting parameter, copy&paste, and a call to usb_set_interface().


I'm connect whit it now.

More work is need but I don't know what do by now...
	... If a use altsetting parameter, why test all altsetting?...


Saludos,
	Aurelio Arroyo
 

Index: xusbatm.c
===================================================================
RCS file: /home/cvs/usbatm/xusbatm.c,v
retrieving revision 1.14
diff -r1.14 xusbatm.c
44a45,46
> XUSBATM_PARM(altsetting, unsigned char, byte, "Alternative setting for data interface (default 0)");
> 
56c58
< 		struct usb_host_interface *alt = intf->altsetting;
---
> 		struct usb_host_interface *alt = usb_altnum_to_altsetting(intf,i);
58c60
< 			if ((alt->endpoint[i].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) == ep)
---
> 			if (alt->endpoint[j].desc.bEndpointAddress == ep)
87a90,91
> 	usb_set_interface(interface_to_usbdev(intf),1,altsetting[drv_ix]);
> 


		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es




More information about the Usbatm mailing list