• Georg Acher's avatar
    [PATCH] USB-UHCI-HCD · a96a4b53
    Georg Acher authored
    After maturing for more than a month, I decided that it's enough...
    So here's the patch for the HCD-version of usb-uhci, I called it
    usb-uhci-hcd. For me, the usual devices work (TM).
    
    Since the internals haven't changed much, I don't expect much difference to
    usb-uhci in functionality and performance.
    
    There is one major improvement: I've added a (preliminary) watchdog, that
    regularly checks whether UHCI interrupts are coming through. If they are
    "missing", ie. the HC halted without saying so, the HC is "re-animated" by a
    real and clean restart, which is (internally) equivalent to a module-reload.
    This is especially for VIA-chips which get comatose quite easily by babble
    or other incorrect transfers.
    
    The side effect is, of course, disconnects for all connected devices, but
    they re-appear after a few seconds and were dead before anyway. So keyboard
    and mouse work again, which is IMO a _very_ useful thing :-)
    
    Another point: The watchdog (currently with moderate 8 interrupts/s) detects
    IRQ-problems, so the misleading "device doesn't accept new device"-message
    is replaced by an immediate error.
    
    More comments and the separation into multiple files (I've taken ohci-hcd as
    an example) should make the code more concise...
    
    A few things are still on the todo-list and will come later:
    - A few watchdog modifications (fewer interrupts, better diagnostics)
    - Support for module "tune"-parameters for breadth/depth search, debug etc.
    - interval support for ISO
    - More SMP-tests
    - maybe changes for reference counting when it is clear what survives :-)
    a96a4b53
usb-uhci-dbg.c 4.55 KB