01 Nov, 2011

1 commit

  • The original implementations reference THIS_MODULE in an inline.
    We could include , but it is better to avoid chaining.

    Fortunately someone else already thought of this, and made a similar
    inline into a #define in for device_schedule_callback(),
    [see commit 523ded71de0] so follow that precedent here.

    Also bubble up any __must_check that were used on the prev. wrapper inline
    functions up one to the real __register functions, to preserve any prev.
    sanity checks that were used in those instances.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

23 Feb, 2010

2 commits


15 Sep, 2009

3 commits

  • Use the generic pci_configure_slot() rather than the acpiphp-specific
    decode_hpp() and program_hpp().

    Unlike the previous acpiphp-specific code, pci_configure_slot() programs
    PCIe settings when an _HPX method provides them, so acpiphp-managed PCIe
    devices can now be configured.

    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Kenji Kaneshige
    Acked-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • This patch adds a new pci_configure_slot() function that programs the
    PCI bus characteristics for a newly-added device. This is based on
    code in pciehp_pci.c, but should be generic enough to be used by pciehp,
    shpchp, and acpiphp.

    The hotplug_params struct and the program_hpp_typeX() functions are based
    on the ACPI definitions, but they aren't really ACPI-specific, and there's
    no alternate implementation, so I don't see the need to abstract them yet.

    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Alex Chiang
    Reviewed-by: Kenji Kaneshige
    Acked-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • This patch makes acpi_get_hp_params_from_firmware() take a
    pci_dev rather than a pci_bus and makes it return a standard
    int errno rather than acpi_status.

    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Kenji Kaneshige
    Acked-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     

14 Sep, 2009

1 commit


10 Sep, 2009

1 commit


24 Jun, 2009

1 commit


18 Jun, 2009

1 commit

  • Returns whether an ACPI CA node is a PCI root bridge or not.

    This API is generically useful, and shouldn't just be a hotplug function.

    The implementation becomes much simpler as well.

    Signed-off-by: Alex Chiang
    Acked-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Alexander Chiang
     

17 Jun, 2009

2 commits

  • Create symbolic link to hotplug driver module in the PCI slot
    directory (/sys/bus/pci/slots/). In the past, we need to load
    hotplug drivers one by one to identify the hotplug driver that handles
    the slot, and it was very inconvenient especially for trouble shooting.
    With this change, we can easily identify the hotplug driver.

    Signed-off-by: Taku Izumi
    Signed-off-by: Kenji Kaneshige
    Reviewed-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     
  • The EMI support in pciehp is obviously broken. It is implemented using
    struct hotplug_slot_attribute, but sysfs_ops for pci_slot_ktype is NOT
    for struct hotplug_slot_attribute, but for struct pci_slot_attribute.
    This bug had been there for a long time, maybe it was introduced when
    PCI slot framework was introduced. The reason why this bug didn't
    cause any problem is maybe the EMI support is not tested at all
    because of lack of test environment.

    As described above, the EMI support in pciehp seems not to be tested
    at all. So this patch removes EMI support from pciehp, instead of
    fixing the bug.

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     

09 Jan, 2009

1 commit


08 Jan, 2009

1 commit

  • 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: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     

31 Dec, 2008

1 commit


23 Oct, 2008

3 commits

  • Now that the PCI core manages the 'name' for each individual
    hotplug driver, and all drivers (except rpaphp) have been converted
    to use hotplug_slot_name(), there is no need for the PCI hotplug
    core to drag around its own copy of name either.

    Cc: kristen.c.accardi@intel.com
    Cc: matthew@wil.cx
    Acked-by: Kenji Kaneshige
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • In preparation for cleaning up the various hotplug drivers
    such that they don't have to manage their own 'name' parameters
    anymore, we provide the following convenience functions:

    pci_slot_name()
    hotplug_slot_name()

    These helpers will be used by individual hotplug drivers.

    Cc: kristen.c.accardi@intel.com
    Cc: matthew@wil.cx
    Acked-by: Kenji Kaneshige
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Update pci_hp_register() to take a const char *name parameter.

    The motivation for this is to clean up the individual hotplug
    drivers so that each one does not have to manage its own name.
    The PCI core should be the place where we manage the name.

    We update the interface and all callsites first, in a
    "no functional change" manner, and clean up the drivers later.

    Cc: kristen.c.accardi@intel.com
    Acked-by: Kenji Kaneshige
    Reviewed-by: Matthew Wilcox
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

11 Jun, 2008

2 commits

  • Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
    hotplug driver is loaded, but PCI slots have attributes such as address,
    speed, width, etc. that are not related to hotplug at all.

    Introduce pci_slot as the primary data structure and kobject model.
    Hotplug attributes described in hotplug_slot become a secondary
    structure associated with the pci_slot.

    This patch only creates the infrastructure that allows the separation of
    PCI slot attributes and hotplug attributes. In this patch, the PCI
    hotplug core remains the only user of this infrastructure, and thus,
    /sys/bus/pci/slots/ will still only become populated when a hotplug
    driver is loaded.

    A later patch in this series will add a second user of this new
    infrastructure and demonstrate splitting the task of exposing pci_slot
    attributes from hotplug_slot attributes.

    - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
    subsidiary structure.
    o pci_create_slot() creates and registers a slot with the PCI core
    o pci_slot_add_hotplug() gives it hotplug capability

    - Change the prototype of pci_hp_register() to take the bus and
    slot number (on parent bus) as parameters.

    - Remove all the ->get_address methods since this functionality is
    now handled by pci_slot directly.

    [achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
    Tested-by: Badari Pulavarty
    Acked-by: Benjamin Herrenschmidt
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: make headers_check happy]
    [akpm@linux-foundation.org: nuther build fix]
    [akpm@linux-foundation.org: fix typo in #include]
    Signed-off-by: Alex Chiang
    Signed-off-by: Matthew Wilcox
    Cc: Greg KH
    Cc: Kristen Carlson Accardi
    Cc: Len Brown
    Acked-by: Kenji Kaneshige
    Signed-off-by: Andrew Morton
    Signed-off-by: Jesse Barnes

    Alex Chiang
     
  • Fix the following problems of shpchp driver about getting hotplug
    control from firmware.

    - The shpchp driver must not control the hotplug controller if it
    fails to get control from the firmware. But current shpchp
    controls the hotplug controller regardless the result, because it
    doesn't check the return value of get_hp_hw_control_from_firmware().

    - Current shpchp driver doesn't support _OSC.

    The pciehp driver already have the code for evaluating _OSC and OSHP
    and shpchp and pciehp can share it. So this patch move that code from
    pciehp to acpi_pcihp.c.

    Signed-off-by: Kenji Kaneshige
    Signed-off-by: Jesse Barnes

    Kenji Kaneshige
     

25 Jan, 2008

1 commit


03 May, 2007

1 commit


19 Oct, 2006

1 commit