Subject: Re: more ulpt!
To: Alfred Perlstein <bright@mu.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 02/26/2002 02:39:41
Alfred Perlstein wrote:

> GRRR!
>
> It seems that if I use the /dev/ulpt0 interface, when I do an open(2)
> on the device, the first time it's ok, however subsequent times
> hang the process while trying to issue the reset request inside
> of ulpt_reset().
>
> The usbdi.c code takes a "default timeout", shouldn't these requests
> somehow timeout?

Yes.


>  In usbd_transfer() there's a tsleep loop that
> doesn't use a timeout, is it the responsibility of the
> pipe->methods->transfer() method to use some sort of callout
> callback to implement the timeout?

The transfer() method should handle the timeout (in whatever way
it likes).


>  Or do we need to pass an
> arg to tsleep?

Shouldn't be necessary.


> Shouldn't the default timeout be a bit shorter it seems to hang
> forever...

The USB 1.0 spec allows a device 5s to respond.


--

        -- Lennart