From: John Homppi <jhomppi@ty...> - 2004-11-24 16:52:53
Normally when a urb is completed devio.c removes the "as" entry from
the async list.
When libusb detects a timeout on a usb_interrupt_read then the
sends an IOCTL_USB_DISCARD to devio.c
The usbdev_ioctl function in devio.c routes the USBDEVFS_DISCARDURB ioctl
(alias for IOCTL_USB_DISCARD) to the proc_unlinkurb function.
The proc_unlinkurb function unlinks the urb BUT the "as" entry is not
specifically removed from any lists.
When the next urb is processed the async_getcompleted function finds the
entry for the timed out urb instead of the correct "as" entry.
(I have not investigated how the "as" entry for the discarded urb gets
Somehow the "as" entry should be removed when a urb is discarded but I
hope that someone with more expertise than myself can address this.
Kernel 2.6.9 downloaded from kernel.org on Nov 16,2004
libusb 0.1.8 downloaded from sourceforge on Nov 23,2004
I have a debug listing that demonstrates the problem if more information is
I will be happy to test any proposed fixes.