1. 31 7月, 2013 1 次提交
  2. 27 6月, 2013 1 次提交
  3. 05 6月, 2013 1 次提交
  4. 28 5月, 2013 2 次提交
  5. 25 4月, 2013 1 次提交
  6. 23 4月, 2013 2 次提交
  7. 18 4月, 2013 1 次提交
  8. 13 4月, 2013 1 次提交
    • J
      PCI: Add pcibios hooks for adding and removing PCI buses · 10a95747
      Jiang Liu 提交于
      On ACPI-based platforms, the pci_slot driver creates PCI slot devices
      according to information from ACPI tables by registering an ACPI PCI
      subdriver.  The ACPI PCI subdriver will only be called when creating/
      destroying PCI root buses, and it won't be called when hot-plugging
      P2P bridges.  It may cause stale PCI slot devices after hot-removing
      a P2P bridge if that bridge has associated PCI slots.  And the acpiphp
      driver has the same issue too.
      
      This patch introduces two hook points into the PCI core, which will
      be invoked when creating/destroying PCI buses for PCI host and P2P
      bridges.  They could be used to setup/destroy platform dependent stuff
      in a unified way, both at boot time and for PCI hotplug operations.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NYinghai Lu <yinghai@kernel.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Myron Stowe <myron.stowe@redhat.com>
      10a95747
  9. 10 4月, 2013 1 次提交
    • B
      PCI: Remove __weak annotation from pcibios_get_phb_of_node decl · 10629d71
      Bjorn Helgaas 提交于
      The __weak annotation on the pcibios_get_phb_of_node() declaration
      causes *every* definition to be marked "weak."  The linker then
      selects one based on link order, which may be the wrong one.
      
      Gabor found that on MIPS, the linker selected the generic implementation
      from drivers/pci even though arch/mips supplied a definition without the
      __weak annotation:
      
      $ mipsel-openwrt-linux-readelf -s arch/mips/pci/built-in.o \
          drivers/pci/built-in.o vmlinux.o | grep pcibios_get_phb_of_node
            86: 0000046c    12 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
          1430: 00012e2c   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
         31898: 0017e4ec   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
      
      This removes the __weak annotation from the pcibios_get_phb_of_node()
      declaration so arch-specific non-weak implementations work reliably.
      Suggested-by: NGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      10629d71
  10. 27 3月, 2013 2 次提交
  11. 31 1月, 2013 2 次提交
  12. 26 1月, 2013 1 次提交
    • Y
      PCI: Skip attaching driver in device_add() · 58d9a38f
      Yinghai Lu 提交于
      We want to add PCI devices to the device tree as early as possible but
      delay attaching drivers.
      
      device_add() adds a device to the device hierarchy and (via
      device_attach()) attaches a matching driver and calls its .probe() method.
      We want to separate adding the device to the hierarchy from attaching the
      driver.
      
      This patch does that by adding "match_driver" in struct pci_dev.  When
      false, we return failure from pci_bus_match(), which makes device_attach()
      believe there's no matching driver.
      
      Later, we set "match_driver = true" and call device_attach() again, which
      now attaches the driver and calls its .probe() method.
      
      [bhelgaas: changelog, explicitly init dev->match_driver,
      fold device_attach() call into pci_bus_add_device()]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      58d9a38f
  13. 25 1月, 2013 1 次提交
  14. 14 1月, 2013 1 次提交
    • R
      ACPI / PCI: Set root bridge ACPI handle in advance · 6c0cc950
      Rafael J. Wysocki 提交于
      The ACPI handles of PCI root bridges need to be known to
      acpi_bind_one(), so that it can create the appropriate
      "firmware_node" and "physical_node" files for them, but currently
      the way it gets to know those handles is not exactly straightforward
      (to put it lightly).
      
      This is how it works, roughly:
      
        1. acpi_bus_scan() finds the handle of a PCI root bridge,
           creates a struct acpi_device object for it and passes that
           object to acpi_pci_root_add().
      
        2. acpi_pci_root_add() creates a struct acpi_pci_root object,
           populates its "device" field with its argument's address
           (device->handle is the ACPI handle found in step 1).
      
        3. The struct acpi_pci_root object created in step 2 is passed
           to pci_acpi_scan_root() and used to get resources that are
           passed to pci_create_root_bus().
      
        4. pci_create_root_bus() creates a struct pci_host_bridge object
           and passes its "dev" member to device_register().
      
        5. platform_notify(), which for systems with ACPI is set to
           acpi_platform_notify(), is called.
      
      So far, so good.  Now it starts to be "interesting".
      
        6. acpi_find_bridge_device() is used to find the ACPI handle of
           the given device (which is the PCI root bridge) and executes
           acpi_pci_find_root_bridge(), among other things, for the
           given device object.
      
        7. acpi_pci_find_root_bridge() uses the name (sic!) of the given
           device object to extract the segment and bus numbers of the PCI
           root bridge and passes them to acpi_get_pci_rootbridge_handle().
      
        8. acpi_get_pci_rootbridge_handle() browses the list of ACPI PCI
           root bridges and finds the one that matches the given segment
           and bus numbers.  Its handle is then used to initialize the
           ACPI handle of the PCI root bridge's device object by
           acpi_bind_one().  However, this is *exactly* the ACPI handle we
           started with in step 1.
      
      Needless to say, this is quite embarassing, but it may be avoided
      thanks to commit f3fd0c8a (ACPI: Allow ACPI handles of devices to be
      initialized in advance), which makes it possible to initialize the
      ACPI handle of a device before passing it to device_register().
      
      Accordingly, add a new __weak routine, pcibios_root_bridge_prepare(),
      defaulting to an empty implementation that can be replaced by the
      interested architecutres (x86 and ia64 at the moment) with functions
      that will set the root bridge's ACPI handle before its dev member is
      passed to device_register().  Make both x86 and ia64 provide such
      implementations of pcibios_root_bridge_prepare() and remove
      acpi_pci_find_root_bridge() and acpi_get_pci_rootbridge_handle() that
      aren't necessary any more.
      
      Included is a fix for breakage on systems with non-ACPI PCI host
      bridges from Bjorn Helgaas.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      6c0cc950
  15. 08 1月, 2013 1 次提交
  16. 11 12月, 2012 1 次提交
  17. 06 12月, 2012 2 次提交
  18. 29 11月, 2012 2 次提交
  19. 27 11月, 2012 1 次提交
    • 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
  20. 15 11月, 2012 1 次提交
  21. 10 11月, 2012 2 次提交
    • 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
  22. 08 11月, 2012 1 次提交
  23. 04 11月, 2012 1 次提交
  24. 31 10月, 2012 1 次提交
  25. 13 10月, 2012 1 次提交
  26. 12 9月, 2012 1 次提交
  27. 11 9月, 2012 1 次提交
  28. 08 9月, 2012 1 次提交
  29. 23 8月, 2012 5 次提交