1. 20 3月, 2009 2 次提交
  2. 05 2月, 2009 1 次提交
  3. 17 1月, 2009 1 次提交
    • R
      PCI PM: Restore standard config registers of all devices early · aa8c6c93
      Rafael J. Wysocki 提交于
      There is a problem in our handling of suspend-resume of PCI devices that
      many of them have their standard config registers restored with
      interrupts enabled and they are put into the full power state with
      interrupts enabled as well.  This may lead to the following scenario:
        * an interrupt vector is shared between two or more devices
        * one device is resumed earlier and generates an interrupt
        * the interrupt handler of another device tries to handle it and
          attempts to access the device the config space of which hasn't been
          restored yet and/or which still is in a low power state
        * the system crashes as a result
      
      To prevent this from happening we should restore the standard
      configuration registers of all devices with interrupts disabled and we
      should put them into the D0 power state right after that.
      Unfortunately, this cannot be done using the existing
      pci_set_power_state(), because it can sleep.  Also, to do it we have to
      make sure that the config spaces of all devices were actually saved
      during suspend.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      aa8c6c93
  4. 08 1月, 2009 13 次提交
  5. 07 1月, 2009 1 次提交
    • R
      PM: Simplify the new suspend/hibernation framework for devices · adf09493
      Rafael J. Wysocki 提交于
      PM: Simplify the new suspend/hibernation framework for devices
      
      Following the discussion at the Kernel Summit, simplify the new
      device PM framework by merging 'struct pm_ops' and
      'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops'
      from 'struct platform_driver' and 'struct pci_driver'.
      
      After this change, the suspend/hibernation callbacks will only
      reside in 'struct device_driver' as well as at the bus type/
      device class/device type level.  Accordingly, PCI and platform
      device drivers are now expected to put their suspend/hibernation
      callbacks into the 'struct device_driver' embedded in
      'struct pci_driver' or 'struct platform_driver', respectively.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      adf09493
  6. 04 11月, 2008 1 次提交
  7. 24 10月, 2008 1 次提交
  8. 23 10月, 2008 6 次提交
  9. 21 10月, 2008 7 次提交
  10. 16 10月, 2008 1 次提交
  11. 27 9月, 2008 1 次提交
  12. 17 9月, 2008 1 次提交
  13. 08 8月, 2008 1 次提交
  14. 07 8月, 2008 1 次提交
    • A
      PCI: make pci_register_driver() a macro · bba81165
      Andrew Morton 提交于
      alpha:
      
      CC [M]  drivers/usb/gadget/u_ether.o
      In file included from include/asm/dma-mapping.h:7,
                       from include/linux/dma-mapping.h:52,
                       from include/linux/dmaengine.h:29,
                       from include/linux/skbuff.h:29,
                       from include/linux/if_ether.h:114,
                       from include/linux/etherdevice.h:27,
                       from drivers/usb/gadget/u_ether.c:29:
      include/linux/pci.h: In function 'pci_register_driver':
      include/linux/pci.h:673: error: 'KBUILD_MODNAME' undeclared (first use in this function)
      include/linux/pci.h:673: error: (Each undeclared identifier is reported only once
      include/linux/pci.h:673: error: for each function it appears in.)
      
      Sam says:
      
      The problem is that u_ether.o is used by two modules so when we build it
      KBUILD_MODNAME is not defined because kbuild does not know what value to
      use.
      
      And in pci.h we have the following inline:
      
      static inline int __must_check pci_register_driver(struct pci_driver *driver)
      {
              return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
      }
      
      And alpha uses dma-mapping.h to nullify a number of functions that seem to
      require something from pci.h.
      
      Making it a macro fixes this particular problem.  However, the underlying issue
      of a file using KBUILD_MODNAME and being shared between multiple modules is
      *not* addressed.  I guess the answer there is "don't do that".
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bba81165
  15. 29 7月, 2008 1 次提交
  16. 23 7月, 2008 1 次提交