search for: enable_device

Displaying 5 results from an estimated 5 matches for "enable_device".

2011 Feb 28
12
[RFC PATCH] set current_state to D0 in register_slot
...device doesn''t support power management (pm_cap == 0) but it is acpi_pci_power_manageable() because there is a _PS0 method declared for it and _EJ0 is also declared for the slot then nobody is going to set current_state = PCI_D0 for this device. This is what I think it is happening: pci_enable_device | __pci_enable_device_flags /* here we do not set current_state because !pm_cap */ | do_pci_enable_device | pci_set_power_state | __pci_start_power_transition | pci_platform_power_transition /* platform_pci_power_manageable() calls acpi_pci_power_manageable that * returns true...
2012 May 15
12
[PATCH 1/4] Introduce a new hotplug state: Force eject.
...b/hw/acpi_piix4.c @@ -587,6 +587,11 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev, return 0; } + if (state == PCI_FORCE_EJECT) { + acpi_piix_eject_slot(s, 1 << slot); + return 0; + } + if (state == PCI_HOTPLUG_ENABLED) { enable_device(s, slot); } else { diff --git a/hw/pci.h b/hw/pci.h index 8d0aa49..3b61e43 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -273,6 +273,7 @@ typedef enum { PCI_HOTPLUG_DISABLED, PCI_HOTPLUG_ENABLED, PCI_COLDPLUG_ENABLED, + PCI_FORCE_EJECT, } PCIHotplugState; typedef int (*pci_hotp...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...art(device); @@ -746,7 +747,7 @@ static int acpiphp_bus_trim(acpi_handle handle) retval = acpi_bus_trim(device, 1); if (retval) - err("cannot remove from acpi list\n"); + pr_err("cannot remove from acpi list\n"); return retval; } @@ -792,7 +793,7 @@ static int __ref enable_device(struct acpiphp_slot *slot) dev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); if (dev) { /* This case shouldn't happen */ - err("pci_dev structure already exists.\n"); + pr_err("pci_dev structure already exists\n"); pci_dev_put(dev); retval = -1; goto...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...art(device); @@ -746,7 +747,7 @@ static int acpiphp_bus_trim(acpi_handle handle) retval = acpi_bus_trim(device, 1); if (retval) - err("cannot remove from acpi list\n"); + pr_err("cannot remove from acpi list\n"); return retval; } @@ -792,7 +793,7 @@ static int __ref enable_device(struct acpiphp_slot *slot) dev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); if (dev) { /* This case shouldn't happen */ - err("pci_dev structure already exists.\n"); + pr_err("pci_dev structure already exists\n"); pci_dev_put(dev); retval = -1; goto...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...art(device); @@ -746,7 +747,7 @@ static int acpiphp_bus_trim(acpi_handle handle) retval = acpi_bus_trim(device, 1); if (retval) - err("cannot remove from acpi list\n"); + pr_err("cannot remove from acpi list\n"); return retval; } @@ -792,7 +793,7 @@ static int __ref enable_device(struct acpiphp_slot *slot) dev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); if (dev) { /* This case shouldn't happen */ - err("pci_dev structure already exists.\n"); + pr_err("pci_dev structure already exists\n"); pci_dev_put(dev); retval = -1; goto...