• David Brownell's avatar
    [PATCH] USB: more functional HCD PCI PM glue · 4808f141
    David Brownell authored
    This patch makes the usbcore PCI suspend/resume logic behave
    much better.  In particular:
    
      - Even HCs without PCI PM support will normally be able
        to support global suspend, saving power ... and will
        need to resume later.  Let them try to suspend; lots
        of not-that-old USB controllers don't have PM caps.
    
      - Saner order for the boilerplate PCI stuff.  It also
        explicitly disables the IRQ and DMA, which aren't
        available in D1/D2/D3 states anyway.
    
      - Uses pci_enable_wake() when the root hub supports
        remote wakeup.  Didn't fully work in one test setup;
        that controller's PME# was evidently ignored.  (Not
        enabled unless CONFIG_USB_SUSPEND.)
    
    It worked for me with brief tests with the current 2.6.6-rc
    uhci-hcd with one old UHCI; more extensive ones with various
    OHCIs (using patches which I'll post soonish); and not at all
    with EHCI (where PM hasn't ever worked).
    
    Those of you who've been having PM problems might find
    this helpful as-is, though I think that unless you're
    using UHCI you'll also need an HCD patch.
    
    - Dave
    4808f141
hcd-pci.c 9.79 KB