Johannes Erdfelt wrote: > > On Mon, Jul 01, 2002, Clemens Ladisch <[EMAIL PROTECTED]> wrote: > > The submit call before the unlink will toggle the D0/D1 bit in > > dev->toggle[]. The call after the unlink will then use the toggled bit > > although the TD of the unlinked URB hasn't been completed successfully. > > Are you sure the TD didn't complete?
Yes. The device (USB MIDI, Roland SC-8820) won't send any data unless explicitly prompted to do so. > How did you determine the data toggle was the problem? A bus analyzer? No, I deduced this from the error pattern: only the first packet to be received won't show up, all following packets are received successfully. This only happens when I execute the submit/unlink sequence once, or an odd number of times. After an even number of times, everything is well. When I add a printk() after the call to uhci_fill_td in the loop in uhci.c's uhci_submit_bulk(), and execute the following code: for (i = 0; i < 3; ++i) { urb->dev = dev; usb_submit_urb(urb); printk(KERN_DEBUG "after submit: toggle = %d\n", usb_gettoggle(dev, ep, 0)); usb_unlink_urb(urb); printk(KERN_DEBUG "after unlink: toggle = %d\n", usb_gettoggle(dev, ep, 0)); } ... I get: Jul 3 10:58:20 aquila kernel: new TD, toggle = 0 Jul 3 10:58:20 aquila kernel: after submit: toggle = 1 Jul 3 10:58:20 aquila kernel: complete, status = -2 Jul 3 10:58:20 aquila kernel: after unlink: toggle = 1 Jul 3 10:58:20 aquila kernel: new TD, toggle = 1 Jul 3 10:58:20 aquila kernel: after submit: toggle = 0 Jul 3 10:58:20 aquila kernel: complete, status = -2 Jul 3 10:58:20 aquila kernel: after unlink: toggle = 0 Jul 3 10:58:20 aquila kernel: new TD, toggle = 0 Jul 3 10:58:20 aquila kernel: after submit: toggle = 1 Jul 3 10:58:20 aquila kernel: complete, status = -2 Jul 3 10:58:20 aquila kernel: after unlink: toggle = 1 (-2 = USB_ST_URB_KILLED) With usb-uhci, I get similar output. > uhci.c explicitly checks for that situation. Oops, now I see that uhci_unlink_generic() has changed in 2.4.19-rc1. I'll have to test that. I did not yet try the code, but shouldn't prevactive be initialized to 0? Clemens ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek No, I will not fix your computer. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel