status = acpi_run_oshp(handle); } if (ACPI_FAILURE(status)) { err("Cannot get control of hotplug hardware\n"); return -1;
if (!pdev || !pdev->bus->parent) break; dbg("Could not find %s in acpi namespace, trying parent\n", pci_name(pdev)); if (!pdev->bus->parent->self)  handle = acpi_get_pci_rootbridge_handle( pci_domain_nr(pdev->bus->parent), pdev->bus->parent->number); else handle = DEVICE_ACPI_HANDLE( &(pdev->bus->parent->self->dev)); pdev = pdev->bus->parent->self;
int get_hp_hw_control_from_firmware(struct pci_dev *dev){	acpi_status status;	acpi_handle handle = DEVICE_ACPI_HANDLE(&(dev->dev));	/*	 * Per PCI firmware specification, we should run the ACPI _OSC	 * method to get control of hotplug hardware before using it	 */	status = pci_osc_control_set(handle,			OSC_PCI_EXPRESS_NATIVE_HP_CONTROL);	/* Fixme: fail native hotplug if _OSC does not exist for root ports */	if (status == AE_NOT_FOUND) {		/*		 * Some older BIOS's don't support _OSC but support		 * OSHP to do the same thing		 */		status = acpi_run_oshp(handle);	}	if (ACPI_FAILURE(status)) {		err("Cannot get control of hotplug hardware\n");		return -1;	}	dbg("Sucess getting control of hotplug hardware\n");	return 0;}