1. 13 3月, 2009 6 次提交
  2. 27 2月, 2009 1 次提交
  3. 25 2月, 2009 3 次提交
  4. 19 2月, 2009 1 次提交
  5. 18 2月, 2009 1 次提交
  6. 15 2月, 2009 1 次提交
  7. 14 2月, 2009 5 次提交
  8. 09 2月, 2009 2 次提交
  9. 05 2月, 2009 10 次提交
  10. 28 1月, 2009 7 次提交
    • M
      PCI hotplug: Change link order of pciehp & acpiphp · 71a082ef
      Matthew Garrett 提交于
      Some hardware exposes PCIE slots in such a way that they can be claimed
      by either the acpiphp or pciehp driver. pciehp is the preferred driver
      if the firmware allows the OS to claim control via the _OSC method so
      should be loaded first - if it fails to bind (either due to a missing
      _OSC method or the firmware refusing to hand off control) then we can
      fall back to acpiphp or a vendor-specific driver.
      
      This patch simply changes the link order to ensure that pciehp will be
      initialised before acpiphp if both are statically built into the kernel.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      71a082ef
    • D
      PCI hotplug: fakephp: Allocate PCI resources before adding the device · bf4162bc
      Darrick J. Wong 提交于
      For PCI devices, pci_bus_assign_resources() must be called to set up the
      pci_device->resource array before pci_bus_add_devices() can be called, else
      attempts to load drivers results in BAR collision errors where there are none.
      This is not done in fakephp, so devices can be "unplugged" but scanning the
      parent bus won't bring the devices back due to resource unallocation.  Move the
      pci_bus_add_device-calling logic into pci_rescan_bus and preface it with a call
      to pci_bus_assign_resources so that we only have to (re)allocate resources once
      per bus where a new device is found.
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Acked-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bf4162bc
    • M
      PCI MSI: Fix undefined shift by 32 · bffac3c5
      Matthew Wilcox 提交于
      Add an msi_mask() function which returns the correct bitmask for the
      number of MSI interrupts you have.  This fixes an undefined bug in
      msi_capability_init().
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      bffac3c5
    • R
      PCI PM: Do not wait for buses in B2 or B3 during resume · 476e7fae
      Rafael J. Wysocki 提交于
      pci_restore_standard_config() adds extra delay for PCI buses in
      low power states (B2 or B3), but this is only correct for buses in
      B2, because the buses in B3 are reset when they are put back into
      B0.  Thus we should wait for such buses to settle after the reset,
      but it's not a good idea to wait that long (1.1 s) with interrupts
      off.
      
      On the other hand, we have never waited for buses in B2 and B3
      during resume and it seems reasonable to go back to this well
      tested behaviour.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      476e7fae
    • R
      PCI PM: Power up devices before restoring their state · 48f67f54
      Rafael J. Wysocki 提交于
      Devices that have MSI-X enabled before suspend to RAM or hibernation
      and that are in a low power state during resume will not be handled
      correctly by pci_restore_standard_config().  Namely, it first calls
      pci_restore_state() which calls pci_restore_msi_state(), which in turn
      executes __pci_restore_msix_state() that accesses the device's memory
      space to restore the contents of the MSI-X table.  However, if the
      device is in a low power state at this point, it's memory space is
      not accessible.
      
      The easiest way to fix this potential problem is to make
      pci_restore_standard_config() call pci_restore_state() after
      it has put the device into the full power state, D0.  Fortunately,
      all of this is done with interrupts off, so the change of ordering
      should not cause any trouble.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      48f67f54
    • R
      PCI PM: Fix hibernation breakage on EeePC 701 · 545ffd58
      Rafael J. Wysocki 提交于
      Hibernation breaks on EeePC 701 as a result of attempting to put one
      of its (driverless) devices into a low power state.  Avoid that by
      not attepmting to power manage driverless devices during hibernation.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      545ffd58
    • R
      PCI PM: Fix suspend error paths and testing facility breakage · 418e4da3
      Rafael J. Wysocki 提交于
      If one of device drivers refuses to suspend by returning error code
      from its ->suspend() callback, the devices that have already been
      suspended are resumed by executing their drivers' ->resume()
      callbacks.  Some of these callbacks expect the device's
      configuration space to be restored if the device has been put into
      D3 before they are called.  Unfortunately, this mechanism has been
      broken by recent changes moving the restoration of config spaces
      of some devices (most importantly, USB controllers and HDA Intel)
      into the resume callbacks executed with interrupts off.  Obviously,
      these callbacks are not invoked in the suspend error path and, as a
      result, the system cannot be successfully brought back into the
      working state in case of a suspend error.  The same thing happens
      in the hibernation error path right before putting the system into
      S4.
      
      Similarly, the suspend testing facility associated with the
      /sys/power/pm_test file is broken, because it uses the very same
      mechanism that is used in the suspend and hibernation error paths.
      
      Fix the breakage by making the PCI core restore the configuration
      spaces of PCI devices that haven't been restored already before
      pci_pm_resume() is called for those devices by the PM core.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      418e4da3
  11. 20 1月, 2009 1 次提交
  12. 17 1月, 2009 2 次提交
    • 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
    • H
      PCI/MSI: bugfix/utilize for msi_capability_init() · 0db29af1
      Hidetoshi Seto 提交于
      This patch fix a following bug and does a cleanup.
      
      bug:
      	commit 5993760f
      	had a wrong change (since is_64 is boolean[0|1]):
      
      -               pci_write_config_dword(dev,
      -                       msi_mask_bits_reg(pos, is_64bit_address(control)),
      -                       maskbits);
      +               pci_write_config_dword(dev, entry->msi_attrib.is_64, maskbits);
      
      utilize:
      	Unify separated if (entry->msi_attrib.maskbit) statements.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Acked-by: N"Jike Song" <albcamus@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0db29af1