PCI hotplug: add pci_configure_slot()
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 <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:

committed by
Jesse Barnes

parent
6a29172ba9
commit
8838400db5
@@ -232,6 +232,15 @@ int acpi_get_hp_params_from_firmware(struct pci_dev *dev,
|
||||
int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags);
|
||||
int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle);
|
||||
int acpi_pci_detect_ejectable(acpi_handle handle);
|
||||
#endif
|
||||
#define pci_get_hp_params(dev, hpp) acpi_get_hp_params_from_firmware(dev, hpp)
|
||||
#else
|
||||
static inline int pci_get_hp_params(struct pci_dev *dev,
|
||||
struct hotplug_params *hpp)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
void pci_configure_slot(struct pci_dev *dev);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user