RE: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-16 Thread Alan Stern
On Mon, 15 Dec 2003, AAZ wrote: > > It looks like the macro version of usb_settoggle() is correct. We see > > > >printk(KERN_WARNING "Mio: %x %x {%x} %x {%x}\n" > > ,ep > > , (ps->dev)->toggle[!(ep & USB_DIR_IN)] > > ,((ps->dev)->toggle[!(ep & USB_DIR_IN)] & ~( 1 << ep &

RE: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-15 Thread AAZ
> > On Sun, 14 Dec 2003, Josep Comas wrote: > > > Hello, > > > > Alan and Duncan, thanks for your comments. > > > > Read this interesting test about it: > > https://sourceforge.net/forum/forum.php?thread_id=987860&forum_id=287227 > > > > Regards, > > Josep > > It looks like the macro version o

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-15 Thread Alan Stern
On Sun, 14 Dec 2003, Josep Comas wrote: > Hello, > > Alan and Duncan, thanks for your comments. > > Read this interesting test about it: > https://sourceforge.net/forum/forum.php?thread_id=987860&forum_id=287227 > > Regards, > Josep It looks like the macro version of usb_settoggle() is cor

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-14 Thread Duncan Sands
Hi Josep, so if I understand right this #define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | ((bit) << (ep))) doesn't work, while this #define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << ep)) | ((bit) << ep))

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-14 Thread Josep Comas
Hello, Alan and Duncan, thanks for your comments. Read this interesting test about it: https://sourceforge.net/forum/forum.php?thread_id=987860&forum_id=287227 Regards, Josep En/na Alan Stern ha escrit: On Thu, 11 Dec 2003, Duncan Sands wrote: What about dev->toggle[out] |= (!!bit) << e

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-12 Thread Alan Stern
On Thu, 11 Dec 2003, Duncan Sands wrote: > What about > > dev->toggle[out] |= (!!bit) << ep; > > ? That should work too. > PS: Since the previous version worked, and this one doesn't, > what changed? It must be the argument types, right? Of course, if the original macro worked then so

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-11 Thread Duncan Sands
> How about instead changing > > > dev->toggle[out] |= bit << ep; > > to > > > if (bit) > > dev->toggle[out] |= 1 << ep; > > Less efficient, but if it avoids a bug it's worth it. What about dev->toggle[out] |= (!!bit) << ep; ? Duncan. PS: Since the previous version

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-11 Thread Alan Stern
On Thu, 11 Dec 2003, Duncan Sands wrote: > Hi Josep, does the following also work? > > --- usb.h.orig2003-12-11 14:29:08.0 +0100 > +++ usb.h 2003-12-11 14:29:16.0 +0100 > @@ -1005,7 +1005,7 @@ > static inline void usb_settoggle(struct usb_device *dev, >

Re: [linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-11 Thread Duncan Sands
> Change this: > > static inline void usb_settoggle(struct usb_device *dev, > unsigned int ep, > unsigned int out, > int bit) > { > dev->toggle[out] &= ~(1 << ep); > dev->toggle[out] |= bit << ep; > } > > by this: > > #define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = > ((dev)->toggle[o

[linux-usb-devel] Timeout problems for ADSL USB modems (second part)

2003-12-08 Thread Josep Comas
To solve USB timeout problems with new kernels (2.4.22, 2.4.23 and others): Edit "./include/linux/usb.h" Change "usb_settoggle" definition. Change this: static inline void usb_settoggle(struct usb_device *dev, unsigned int ep, unsigned int out, int bit) { dev->toggle[out] &= ~(1 << ep); dev->to

[linux-usb-devel] Timeout problems for ADSL USB modems

2003-12-08 Thread Josep Comas
Hello, I have adapted Alcatel Speedtouch USB Linux driver to work with several ADSL USB modems. I'd like know your conclusion about timeout problems. Please, you see this thread: https://sourceforge.net/forum/forum.php?thread_id=952503&forum_id=287227 Solution for kernel 2.4.23 from an user: "I