Question about pipes and ugen

Julian Elischer julian at elischer.org
Fri Dec 3 14:20:30 PST 2004



M. Warner Losh wrote:

>In message: <41B0DD18.9080300 at elischer.org>
>            Julian Elischer <julian at elischer.org> writes:
>: 
>: 
>: M. Warner Losh wrote:
>: 
>: >In message: <41B0C118.8070001 at elischer.org>
>: >            Julian Elischer <julian at elischer.org> writes:
>: >: I didn't say stack.. I said libusb (excepty I spelled it usblib)
>: >
>: >OK.  I got confused...
>: >
>: >: it recovers on several machines where FreeBSD looses communications with 
>: >: the target after an error.
>: >
>: >Hmmmm.  Actually, FreeBSD does do the ClearFeature(Halt) on opening of
>: >pipes by the driver (which ugen does each time the pipe subdevice is
>: >opened).  ClearFeature(Stall) was unfortunately typed from memory
>: >rather than looking at the standard (section 9.4.5).  What were you
>: >thinking about changing in this area?
>: >
>: 
>: BTW it does the halt too late.. by that time it has already tried to do 
>: other opertations that
>: have probably timed out (at least on the stupid device I have) so it's 
>: aborted before it ever gets
>: to the ClearFeature(Halt).
>
>It does this as soon as the driver opens the pipe.  Nothing can have
>happened on the pipe before that.  I don't understand what you are
>saying here.  It might also do it other times, but it definitely does
>it on open...
>

on our usb-scope the first commands on open are :

bmRequestrType    (setup packet to EP0) 80 06 01 03 00 00 00 02 00
followed by an IN from EP0 to retrieve a descriptor string.
the IN never completes..

so the full picture is:

OUT to EP2  (1 byte  command requesting status to be fetched from EP3)
program exits due to some unspecified reason.. so IN on EP3 is never done..
[device apparently times out somehow and sets  HALT feature "HALT" on EP3]

re-run program.
opens ugen0.0
results in:
bmRequestrType    (setup packet to EP0) 80 06 01 03 00 00 00 02 00
IN               [never completes] (receives millions of NACKs from the 
device).


Linux apparently doesn't do the setup request on open but
instead just goes straight to allowing libusb to access the device..

libusb does, times out and doesn the ClearFeature(Halt)
which apparently fixes everything. and then continues on its merry way.

as ai said.. the device seems broken..

you can unplug it and re-plug it and it is still in this state..

But it would be nice to be able to actually open the ugen device so that
we could try fix it like Linux does..





>
>Warner
>_______________________________________________
>freebsd-usb at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-usb
>To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"
>  
>



More information about the freebsd-usb mailing list