>
>Is there a reason you can't submit the read urb to ep 2 before sending
>the command to ep 4?  Or, how about having the completion handler for ep
>4 submit the read urb to ep 2?  Then you _know_ the write command
>completed before trying to read (you can't rely on the status !=
>EINPROGRESS as I've been reminded at times :)

Well THAT's a good one:

changed
         while( urb->status == -EINPROGRESS )
                 schedule();

to
         while( !wakeupdata->urb_complete )
                 schedule();

with wakeupdata->urb_complete being set in the urb's completion handler.

An here we go; it' been working for hours on end !
But again: only with uhci. usb-uhci breaks down with a segfault.

Why doesn't the former work ? The code i'm using is exactly the same as the 
api-wrapper stuff in usb.c (except that there's two urb's on the line).

If my task is seeing false wakeup's, that would mean, the status has 
changed from EINPROGRESS to something else, before the completions handler 
was called, right ?
But nearly everybody is relying on this behaviour ??

(Note: same thing for UP and SMP !)

>Hope this helps,

Thanks,

- sda



_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to