I've been able to track down a bug in ep_unlink() which leaves
interrupt endpoint descriptors linked into the hcca int_table. This
only seems to happen when there are a large number of devices (and
thus ED's) using interrupts. I only noticed it when I had about 11
devices (hubs, keyboards, mice) connected. 

This resulted in the BUG() in dma_to_ed_td() being called from time to
time, because although the ED remained in the int_table, it had been
removed from the ED hash. I believe that it also caused the problem
discussed in this message (I applied the Chris' patch printed a
message when it occured, so I know it happened in my set-up):

http://www.geocrawler.com/archives/3/2571/2001/10/0/6943263/

The problem is that when ED's begin forming lists, the inner loop of
the PIPE_INTERRUPT case causes inter to be set to the interval of the
ED it is visiting, resulting in the outer loop finishing before all of
the ED entried have been removed, which doesn't seem like the right
thing.


-- 
       Matt Hughes
    [EMAIL PROTECTED]
      ICQ: 22525032
http://www.enel.ucalgary.ca/~hughes

===File ~/Projects/multihead/usb/ohci-ep_unlink-patch=======
--- usb-ohci-ref.c      Thu Feb 28 19:34:06 2002
+++ usb-ohci.c  Thu Feb 28 19:38:10 2002
@@ -1130,8 +1130,7 @@
                for (i = 0; i < ep_rev (6, interval); i += inter) {
                        for (ed_p = &(ohci->hcca->int_table[ep_rev (5, i) + 
int_branch]), inter = 1; 
                                (*ed_p != 0) && (*ed_p != ed->hwNextED); 
-                               ed_p = &((dma_to_ed (ohci, le32_to_cpup 
(ed_p)))->hwNextED), 
-                               inter = ep_rev (6, (dma_to_ed (ohci, le32_to_cpup 
(ed_p)))->int_interval)) {                            
+                               ed_p = &((dma_to_ed (ohci, le32_to_cpup 
+(ed_p)))->hwNextED) {                           
                                        if((dma_to_ed (ohci, le32_to_cpup (ed_p))) == 
ed) {
                                                *ed_p = ed->hwNextED;           
                                                break;
============================================================

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

Reply via email to