• David Brownell's avatar
    [PATCH] USB: OHCI init cleanups · 13319e15
    David Brownell authored
    This ought to fix the NS9750 init issue, and make the AMD756 case
    at least somewhat better.  It makes the init go "by the book" in more
    ways, and formalizes one quirk.
    
    Various OHCI init/reset cleanups for different silicion environments:
    
     - Reset a bit more "by the book".
    
        * Define a new quirk flag for the SiS and OPTi problem seen earlier.
          Since 2.4 we've always worked around that quirk, even though we've
          not seen that on other chips; but it's "wrong" and doesn't work on
          some chips (notably NetSilicon NS9750).
    
          The quirk still seems to be needed for SiS, but either this test
          machine is too fast for the OPTi problem to show up, or the frame
          timing setup problem there came from a now-fixed bug.
    
        * Look at the HC state before resetting it; depending on whether
          it was previously owned by BIOS, SMM, an OS, or nobody, different
          USB signaling (and timings) might be needed.
    
        * Re-init the frame timings right after soft reset, rather than
          later (potentially too much later).
    
        * Restore a reset in the PCI startup code, so this logic more closely
          resembles the non-PCI paths (future code sharing).  It also makes it
          easier to guarantee a 1-millisecond ceiling between reset and "go".
    
          An earlier reset is being done to help workaround BIOS-related
          problems on some boards, but we may need an even earlier one
          (as a PCI quirk, before IRQs get reconfigured).
    
     - Add an explicit #define to disable the BIOS/SMM handoff; it's
       not just HPPA, many embedded chips don't expect BIOS either.
    
     - There are reports of AMD 756 machines disliking the OHCI suspend
       patch of a few months back.  Erratum #10 partly explains that, so
       now root hubs won't autosuspend on those Slot-A era chips.
    
     - Other minor fixes
    
        * We've got lots of non-PCI OHCI now too, so comments shouldn't
          be assuming all-is-pci!
    
        * Hey, it's unsafe to call hc_reset() in IRQ (after unrecoverable
          error); so just force a soft reset, don't do the whole thing.
    
    Tested on half a dozen different OHCI versions, but maybe some other
    versions of OHCI will be sensitive to one of these changes.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    13319e15
ohci.h 14.8 KB