On Thu, Aug 27, 2009 at 09:00:38AM -0600, Bjorn Helgaas wrote: > On Wednesday 26 August 2009 11:00:28 pm Rolf Eike Beer wrote: > > Bjorn Helgaas wrote: > > > 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 this should be generic enough to be used by > > > pciehp, shpchp, and acpiphp. > > > > > diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h > > > index 0f3e1db..8cff1d5 100644 > > > --- a/include/linux/pci_hotplug.h > > > +++ b/include/linux/pci_hotplug.h > > > @@ -230,6 +230,10 @@ int acpi_get_hp_params(struct pci_dev *dev, struct > > > hotplug_params *hpp); 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(struct pci_bus > > > *pbus); > > > +#else > > > +#define acpi_get_hp_params(dev, hpp) (-ENODEV) > > > > Shouldn't that be "static inline acpi_get_hp_params(...) { return -ENODEV; }" > > so it behaves exactly like the original function (e.g. function pointer can be > > taken)? > > Thanks, Eike, that's a good point. I copied the style from the > original pciehp_get_hp_params_from_firmware() definitions (which > my next patch removes), but it would be an improvement to use an > inline function. > > It also occurred to me last night that pci_configure_slot() will > probably need to be exported, and that there's no need to check > "dev->is_pcie" before calling program_hpp_type2(), because we > bail out of program_hpp_type2() anyway if there's no PCI_CAP_ID_EXP. Bjorn, I didn't see any 'acpiphp' functional issues when I just tried 2.6.31-rc7 with your patches (plus the definitely needed pci_configure_slot export) on one of our systems (IBM x3850). Gary -- Gary Hade System x Enablement IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 garyhade@xxxxxxxxxx http://www.ibm.com/linux/ltc -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html