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 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 & 0xf )) | ((0) << ep & 0xf)
      ,((ps->dev)->toggle[!(ep & USB_DIR_IN)] & ~( 1 << ( ep & 0xf ) )) | ((0) << ep & 
0xf)
      ,((ps->dev)->toggle[!(ep & USB_DIR_IN)] & ~((1 << ep )& 0xf )) | ((0) << ep & 
0xf)
      );

      And the output in amload:

      Mio: 5 0 {0} 0 {0}
      Mio: 85 0 {0} 0 {0}
      Mio: 5 20 {20} 0 {20} <====== Differents result as macro and as function. 
usb_resetep(adsl_handle, USB_OUT_FIRM );
      Mio: 85 0 {0} 0 {0}


In "Mio: 5 20 {20} 0 {20}", the 0 value is what the result should be, and 
that's what you would get using the macro.

So the real problem was the call of

        clear_endpoints (ads_handle, 1 );

in amload.c; probably it doesn't belong there at all.  Is that your 
conclusion?

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to