On Wed, 30 Jun 2004, John Que wrote:

> Hello,
> I must now  add , that it seems to me ,after adding some printk() messages, 
> that after calling usb_set_interface()  with alternate setting 1 (the 
> alternate setting to which I
> try to change  and with which the application hangs in ioctl () as I 
> al;ready described in my fist post)
> the endpoint DOES NOT stall.
> 
> What I did is:
> I added before , and after , usb_set_interface() , the following 2 printk():
> 
>       Err(KERN_ERR "[pwc-if.c]  pdev->udev->halted[0] 
> %d\n",pdev->udev->halted[0]);
>       Err(KERN_ERR "[pwc-if.c] pdev->udev->halted[1] 
> %d\n",pdev->udev->halted[1]);
> 
> and both values are 0 , before and after the call.
> 
> Also when I try to call usb_set_interface()  with alternate setting 3, which 
> succeeds and does not hang , all these halt flag values are 0.
> 
> I don't know wheterh this check is accurate; after looking at
> usb_endpoint_halt macro in usb.h , it seems to me that possibly this
> means wheteher the endpoint is halted/stalled or not.

No it doesn't.  The udev->halted[] arrays are unreliable and are due to
be removed from the USB stack.

If you want to tell whether an endpoint is stalled, there are two possible 
ways to do it.  You can try to send data to or from the endpoint.  Or you 
can issue a Get-Status request for the endpoint (see Section 9.4.5 and 
Figure 9-6 in the USB 2.0 Specification).

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to