-
David Brownell authored
Another UHCI patch. I'm sending this since Dan said he was going to start teaching "uhci-hcd" how to do control and interrupt queueing, and this may help. Granted it checks out (I didn't test the part that has a chance to break, though it "looks right"), I think it should get merged in at some point. What it does: - updates and adds some comments/docs - gets rid of a "magic number" calling convention, instead passing an explicit flag UHCI_PTR_DEPTH or UHCI_PTR_BREADTH (self-doc :) - deletes bits of unused/dead code - updates the append-to-qh code: * start using list_for_each() ... clearer than handcrafted loops, and it prefetches too. Lots of places should get updated to do this, IMO. * re-orders some stuff to fix a sequencing problem * adds ascii-art to show how the urb queueing is done (based on some email Johannes sent me recently) That sequencing problem is that when splicing a QH between A and B, it currently splices A-->QH before QH-->B ... so that if the HC is looking at that chunk of schedule at that time, everything starting at B will be ignored during the rest of that frame. (Since the QH is initted to have UHCI_PTR_TERM next, stopping the schedule scan.) I said "problem" not "bug" since in the current code it would probably (what does that "PIIX bug" do??) just reduce control/bulk throughput. That's because the logic is only appending towards the end of each frame's schedule, where the FSBR loopback kicks in.
73073f12