1. 08 12月, 2012 10 次提交
  2. 07 12月, 2012 1 次提交
  3. 06 12月, 2012 5 次提交
  4. 05 12月, 2012 2 次提交
    • B
      Merge branch 'pci/huang-d3cold-fixes' into next · edb1daab
      Bjorn Helgaas 提交于
      * pci/huang-d3cold-fixes:
        PCI/PM: Keep runtime PM enabled for unbound PCI devices
      edb1daab
    • H
      PCI/PM: Keep runtime PM enabled for unbound PCI devices · 967577b0
      Huang Ying 提交于
      For unbound PCI devices, what we need is:
      
       - Always in D0 state, because some devices do not work again after
         being put into D3 by the PCI bus.
      
       - In SUSPENDED state if allowed, so that the parent devices can still
         be put into low power state.
      
      To satisfy these requirements, the runtime PM for the unbound PCI
      devices are disabled and set to SUSPENDED state.  One issue of this
      solution is that the PCI devices will be put into SUSPENDED state even
      if the SUSPENDED state is forbidden via the sysfs interface
      (.../power/control) of the device.  This is not an issue for most
      devices, because most PCI devices are not used at all if unbound.
      But there are exceptions.  For example, unbound VGA card can be used
      for display, but suspending its parents makes it stop working.
      
      To fix the issue, we keep the runtime PM enabled when the PCI devices
      are unbound.  But the runtime PM callbacks will do nothing if the PCI
      devices are unbound.  This way, we can put the PCI devices into
      SUSPENDED state without putting the PCI devices into D3 state.
      
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=48201Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org          # v3.6+
      967577b0
  5. 01 12月, 2012 2 次提交
  6. 29 11月, 2012 3 次提交
  7. 27 11月, 2012 2 次提交
    • V
      PCI/AER: Report success only when every device has AER-aware driver · 918b4053
      Vijay Mohan Pandarathil 提交于
      When an error is detected on a PCIe device which does not have an
      AER-aware driver, prevent AER infrastructure from reporting
      successful error recovery.
      
      This is because the report_error_detected() function that gets
      called in the first phase of recovery process allows forward
      progress even when the driver for the device does not have AER
      capabilities. It seems that all callbacks (in pci_error_handlers
      structure) registered by drivers that gets called during error
      recovery are not mandatory. So the intention of the infrastructure
      design seems to be to allow forward progress even when a specific
      callback has not been registered by a driver. However, if error
      handler structure itself has not been registered, it doesn't make
      sense to allow forward progress.
      
      As a result of the current design, in the case of a single device
      having an AER-unaware driver or in the case of any function in a
      multi-function card having an AER-unaware driver, a successful
      recovery is reported.
      
      Typical scenario this happens is when a PCI device is detached
      from a KVM host and the pci-stub driver on the host claims the
      device. The pci-stub driver does not have error handling capabilities
      but the AER infrastructure still reports that the device recovered
      successfully.
      
      The changes proposed here leaves the device(s)in an unrecovered state
      if the driver for the device or for any device in the subtree
      does not have error handler structure registered. This reflects
      the true state of the device and prevents any partial recovery (or no
      recovery at all) reported as successful.
      
      [bhelgaas: changelog]
      Signed-off-by: NVijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLinas Vepstas <linasvepstas@gmail.com>
      Reviewed-by: NMyron Stowe <myron.stowe@redhat.com>
      918b4053
    • B
      Merge branch 'for-linus' into next · d3fe3988
      Bjorn Helgaas 提交于
      * for-linus:
        PCI/portdrv: Don't create hotplug slots unless port supports hotplug
        PCI/PM: Fix proc config reg access for D3cold and bridge suspending
        PCI/PM: Resume device before shutdown
        PCI/PM: Fix deadlock when unbinding device if parent in D3cold
      d3fe3988
  8. 14 11月, 2012 4 次提交
  9. 10 11月, 2012 11 次提交
    • B
      PCI: Remove useless "!dev" tests · 1452cd76
      Bjorn Helgaas 提交于
      No need to check "!dev" when the caller should always supply a valid
      pointer.  If the caller *doesn't* supply a valid pointer, it probably
      won't check for a failure return either.  This way we'll oops and get a
      backtrace.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1452cd76
    • B
      PCI: Use spec names for SR-IOV capability fields · 6b136724
      Bjorn Helgaas 提交于
      Use the same names (almost) as the spec for TotalVFs, InitialVFs, NumVFs.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      6b136724
    • D
      PCI: Provide method to reduce the number of total VFs supported · bff73156
      Donald Dutile 提交于
      Some implementations of SRIOV provide a capability structure
      value of TotalVFs that is greater than what the software can support.
      Provide a method to reduce the capability structure reported value
      to the value the driver can support.
      This ensures sysfs reports the current capability of the system,
      hardware and software.
      Example for its use: igb & ixgbe -- report 8 & 64 as TotalVFs,
      but drivers only support 7 & 63 maximum.
      Signed-off-by: NDonald Dutile <ddutile@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      bff73156
    • D
      PCI: SRIOV control and status via sysfs · 1789382a
      Donald Dutile 提交于
      Provide files under sysfs to determine the maximum number of VFs
      an SR-IOV-capable PCIe device supports, and methods to enable and
      disable the VFs on a per-device basis.
      
      Currently, VF enablement by SR-IOV-capable PCIe devices is done
      via driver-specific module parameters.  If not setup in modprobe files,
      it requires admin to unload & reload PF drivers with number of desired
      VFs to enable.  Additionally, the enablement is system wide: all
      devices controlled by the same driver have the same number of VFs
      enabled.  Although the latter is probably desired, there are PCI
      configurations setup by system BIOS that may not enable that to occur.
      
      Two files are created for the PF of PCIe devices with SR-IOV support:
      
          sriov_totalvfs	Contains the maximum number of VFs the device
      			could support as reported by the TotalVFs register
      			in the SR-IOV extended capability.
      
          sriov_numvfs	Contains the number of VFs currently enabled on
      			this device as reported by the NumVFs register in
      			the SR-IOV extended capability.
      
      			Writing zero to this file disables all VFs.
      
      			Writing a positive number to this file enables that
      			number of VFs.
      
      These files are readable for all SR-IOV PF devices.  Writes to the
      sriov_numvfs file are effective only if a driver that supports the
      sriov_configure() method is attached.
      Signed-off-by: NDonald Dutile <ddutile@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1789382a
    • Y
      PCI: Use is_visible() with boot_vga attribute for pci_dev · 625e1d59
      Yinghai Lu 提交于
      Should make pci_create_sysfs_dev_files() simpler.  Also fix possible
      memleak in remove path.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      625e1d59
    • Y
      PCI: Add pci_device_type to pdev's device struct · 4e15c46b
      Yinghai Lu 提交于
      Need type filled in device structure so it can be used for visible
      attribute control in sysfs for pci_dev.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      4e15c46b
    • J
      PCI: Fix bit definitions of PCI_EXP_LNKCAP2 register · b891b4dc
      Jingoo Han 提交于
      According to the PCIe 3.0 spec, PCI_EXP_LNKCAP2_SLS_2_5GB is
      1st bit of PCI_EXP_LNKCAP2 register, not 0th bit. So, the bit
      definition of supported link speed vector should be fixed.
      
      [bhelgaas: change "Current" to "Supported"]
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      b891b4dc
    • B
      Merge branch 'pci/mike-x86-tra' into next · 0dcccc5c
      Bjorn Helgaas 提交于
      * pci/mike-x86-tra:
        x86/PCI: Allow x86 platforms to use translation offsets
      0dcccc5c
    • B
      Merge branch 'pci/taku-prt-cleanup' into next · 05508270
      Bjorn Helgaas 提交于
      * pci/taku-prt-cleanup:
        PCI/ACPI: Request _OSC control before scanning PCI root bus
        PCI: Don't pass pci_dev to pci_ext_cfg_avail()
        PCI/ACPI: Add _PRT interrupt routing info before enumerating devices
        ACPI: Pass segment/bus to _PRT add/del so they don't depend on pci_bus
      05508270
    • B
      Merge branch 'pci/yinghai-for-pci-root-bus-hotplug' into next · fa20f6f2
      Bjorn Helgaas 提交于
      * pci/yinghai-for-pci-root-bus-hotplug:
        PCI/ACPI: Remove acpi_root_driver in reverse order
        PCI/ACPI: Delete host bridge _PRT during hot remove path
        PCI/ACPI: Make acpi_pci_root_remove() stop/remove pci root bus
        PCI: Add pci_stop_and_remove_root_bus()
        PCI/ACPI: Assign unassigned resource for hot-added root bus
        PCI: Move out pci_enable_bridges out of assign_unsigned_bus_res
        PCI: Move pci_rescan_bus() back to probe.c
        PCI: Separate out pci_assign_unassigned_bus_resources()
      fa20f6f2
    • B
      Merge branch 'pci/misc' into next · 13a84687
      Bjorn Helgaas 提交于
      * pci/misc:
        PCI/PM: Add comments for PME poll support for PCIe
        PCI: Add PLX PCI 9050 workaround for some Meilhaus DAQ cards
        PCI: Add workaround for PLX PCI 9050 BAR alignment erratum
        PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
        x86/PCI: Ignore _SEG on HP xw9300
        PCI: Don't touch card regs after runtime suspend D3
      13a84687