1. 27 Jan, 2013 1 commit
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yijing-ari' into next · 14b5cb37
      Bjorn Helgaas authored
      * pci/yijing-ari:
        PCI: shpchp: Iterate over all devices in slot, not functions 0-7
        PCI: sgihp: Iterate over all devices in slot, not functions 0-7
        PCI: cpcihp: Iterate over all devices in slot, not functions 0-7
        PCI: pciehp: Iterate over all devices in slot, not functions 0-7
        PCI: Consolidate "next-function" functions
        PCI: Rename pci_enable_ari() to pci_configure_ari()
        PCI: Enable ARI if dev and upstream bridge support it; disable otherwise
      14b5cb37
  2. 25 Jan, 2013 6 commits
  3. 24 Jan, 2013 1 commit
    • Yijing Wang's avatar
      PCI: Enable ARI if dev and upstream bridge support it; disable otherwise · b0cc6020
      Yijing Wang authored
      Currently, we enable ARI in a device's upstream bridge if the bridge and
      the device support it.  But we never disable ARI, even if the device is
      removed and replaced with a device that doesn't support ARI.
      
      This means that if we hot-remove an ARI device and replace it with a
      non-ARI multi-function device, we find only function 0 of the new device
      because the upstream bridge still has ARI enabled, and next_ari_fn()
      only returns function 0 for the new non-ARI device.
      
      This patch disables ARI in the upstream bridge if the device doesn't
      support ARI.  See the PCIe spec, r3.0, sec 6.13.
      
      [bhelgaas: changelog, function comment]
      Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      b0cc6020
  4. 17 Jan, 2013 1 commit
  5. 14 Jan, 2013 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / PCI: Set root bridge ACPI handle in advance · 6c0cc950
      Rafael J. Wysocki authored
      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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      6c0cc950
  6. 10 Jan, 2013 2 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yinghai-survey-resources+acpi-scan' into next · b7040469
      Bjorn Helgaas authored
      * pci/yinghai-survey-resources+acpi-scan:
        ACPI / scan: Treat power resources in a special way
        ACPI: Remove unused struct acpi_pci_root.id member
        ACPI: Drop ACPI device .bind() and .unbind() callbacks
        ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
        ACPI / PCI: Rework the setup and cleanup of device wakeup
        ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type
        ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
        ACPI: Replace ACPI device add_type field with a match_driver flag
        ACPI: Drop the second argument of acpi_bus_scan()
        ACPI: Remove the arguments of acpi_bus_add() that are not used
        ACPI: Remove acpi_start_single_object() and acpi_bus_start()
        ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
        ACPI: Change the ordering of acpi_bus_check_add()
        ACPI: Replace struct acpi_bus_ops with enum type
        ACPI: Reduce the usage of struct acpi_bus_ops
        ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
        ACPI: Change the ordering of PCI root bridge driver registrarion
        ACPI: Separate adding ACPI device objects from probing ACPI drivers
      b7040469
    • Bjorn Helgaas's avatar
      Merge branch 'acpi-scan' of... · 295a7f62
      Bjorn Helgaas authored
      Merge branch 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into pci/yinghai-survey-resources+acpi-scan
      
      * 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / scan: Treat power resources in a special way
        ACPI: Remove unused struct acpi_pci_root.id member
        ACPI: Drop ACPI device .bind() and .unbind() callbacks
        ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
        ACPI / PCI: Rework the setup and cleanup of device wakeup
        ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type
        ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
        ACPI: Replace ACPI device add_type field with a match_driver flag
        ACPI: Drop the second argument of acpi_bus_scan()
        ACPI: Remove the arguments of acpi_bus_add() that are not used
        ACPI: Remove acpi_start_single_object() and acpi_bus_start()
        ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
        ACPI: Change the ordering of acpi_bus_check_add()
        ACPI: Replace struct acpi_bus_ops with enum type
        ACPI: Reduce the usage of struct acpi_bus_ops
        ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
        ACPI: Change the ordering of PCI root bridge driver registrarion
        ACPI: Separate adding ACPI device objects from probing ACPI drivers
      
      Conflicts:
      	drivers/acpi/pci_root.c
      295a7f62
  7. 09 Jan, 2013 2 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yinghai-survey-resources' into next · e84813c0
      Bjorn Helgaas authored
      * pci/yinghai-survey-resources:
        x86/PCI: Implement pcibios_resource_survey_bus()
        PCI/ACPI: Reserve firmware-allocated resources for hot-added root buses
        x86/PCI: Keep resource allocation functions after boot
        x86/PCI: Don't track firmware-assigned BAR values for hot-added devices
        x86/PCI: Factor out pcibios_allocate_dev_rom_resource()
        x86/PCI: Allocate resources on a per-bus basis for hot-adding root buses
        x86/PCI: Factor out pcibios_allocate_dev_resources()
        x86/PCI: Factor out pcibios_allocate_bridge_resources()
      e84813c0
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' into next · e84d0ded
      Bjorn Helgaas authored
      * pci/misc:
        PCI: cpqphp: Cleanup and remove unreachable paths
        PCI: Drop "__" prefix on __pci_enable_device_flags()
        PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
        mn10300/PCI: Remove unused pci_root_bus
        frv/PCI: Remove unused pci_root_bus
        x86/PCI: Remove unused pci_root_bus
      e84d0ded
  8. 07 Jan, 2013 10 commits
  9. 04 Jan, 2013 4 commits
  10. 03 Jan, 2013 12 commits