ChangeSet 1.1005.1.9, 2003/06/27 15:23:13-07:00, david@csse.uwa.edu.au [PATCH] USB: usb-uhci fix for one-shot interrupt problem A change introduced into usb-uhci.c in 2.4.21 causes the kernel to freeze when usb-uhci is used with any driver using one-shot interrupt transfers. The attached fix was originally proposed by Frode Isaksen and improved by Pete Zaitcev. Pete Zaitcev has applied this patch as an errata fix for the RedHat 9.0 kernel. Other than the serious problem that this causes with the Lego USB driver (and yes, this is used pretty heavily in Universities for teaching and some research), there are other drivers (e.g. Visor Treo 90) that this causes problems for. drivers/usb/host/usb-uhci.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/host/usb-uhci.c b/drivers/usb/host/usb-uhci.c --- a/drivers/usb/host/usb-uhci.c Fri Jun 27 16:27:08 2003 +++ b/drivers/usb/host/usb-uhci.c Fri Jun 27 16:27:08 2003 @@ -2430,9 +2430,9 @@ _static int process_interrupt (uhci_t *s, struct urb *urb) { - int i, ret = -EINPROGRESS; + int ret = -EINPROGRESS; urb_priv_t *urb_priv = urb->hcpriv; - struct list_head *p = urb_priv->desc_list.next; + struct list_head *p; uhci_desc_t *desc = list_entry (urb_priv->desc_list.prev, uhci_desc_t, desc_list); int actual_length; @@ -2440,8 +2440,9 @@ //dbg("urb contains interrupt request"); - for (i = 0; p != &urb_priv->desc_list; p = p->next, i++) // Maybe we allow more than one TD later ;-) - { + // Maybe we allow more than one TD later ;-) + while ((p = urb_priv->desc_list.next) != &urb_priv->desc_list) { + desc = list_entry (p, uhci_desc_t, desc_list); if (is_td_active(desc)) {