1. 20 3月, 2009 3 次提交
  2. 08 1月, 2009 3 次提交
    • K
      PCI hotplug: introduce functions for ACPI slot detection · e8c331e9
      Kenji Kaneshige 提交于
      Some ACPI related PCI hotplug code can be shared among PCI hotplug
      drivers. This patch introduces the following functions in
      drivers/pci/hotplug/acpi_pcihp.c to share the code, and changes
      acpiphp and pciehp to use them.
      
      - int acpi_pci_detect_ejectable(struct pci_bus *pbus)
        This checks if the specified PCI bus has ejectable slots.
      
      - int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle)
        This checks if the specified handle is ejectable ACPI PCI slot. The
        'pbus' parameter is needed to check if 'handle' is PCI related ACPI
        object.
      
      This patch also introduces the following inline function in
      include/linux/pci-acpi.h, which is useful to get ACPI handle of the
      PCI bridge from struct pci_bus of the bridge's secondary bus.
      
      - static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
        This returns ACPI handle of the PCI bridge which generates PCI bus
        specified by 'pbus'.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      e8c331e9
    • K
      PCI: pciehp: add auto option to pciehp_detect_mode · e046cbd6
      Kenji Kaneshige 提交于
      ACPI based hot-pluggable PCIe slot detection logic was added to
      prevent the problem non hot-pluggable PCIe slot was detected as
      hot-pluggable. The slot detection logic can be selected through
      'pciehp_detect_mode', but it would be better if it is selected
      automatically.
      
      This patch adds 'auto' option for 'pciehp_detect_mode'. When it is
      specified, pciehp judges which 'acpi' or 'pcie' should be used. It
      seems that the physical slot number is duplicated among some slots on
      most of the platforms with the above-mentioned problem. So 'auto' mode
      uses this information to judge which 'acpi' or 'pcie' should be
      used. That is, if duplicated physical slot numbers are detected,
      'acpi' mode is used. This method is not perfect, but it's realistic.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      e046cbd6
    • K
      PCI: pciehp: add ACPI based slot detection · c9ffa5a5
      Kenji Kaneshige 提交于
      There is a problem that some non hot-pluggable PCIe slots are detected
      as hot-pluggable by pciehp on some platforms. The immediate cause of
      this problem is that hot-plug capable bit in the Slot Capabilities
      register is set even for non hot-pluggable slots on those platforms.
      It seems a BIOS/hardware problem, but we need workaround about that.
      
      Some of those platforms define hot-pluggable PCIe slots on ACPI
      namespace properly, while hot-plug capable bit in the Slot
      Capabilities register is set improperly. So using ACPI namespace
      information in pciehp to detect PCIe hot-pluggable slots would be a
      workaround.
      
      This patch adds 'pciehp_detect_mode' module option. When 'acpi' is
      specified, pciehp uses ACPI namespace information to detect PCIe
      hot-pluggable slots.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      c9ffa5a5