mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
PCI/PM: Set current_state to D3cold if the device is not accessible
Make pci_power_up() and pci_set_low_power_state() change current_state to PCI_D3cold when the device is not accessible along the lines of pci_update_current_state(). Link: https://lore.kernel.org/r/10104376.nUPlyArG6x@kreacher Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
committed by
Bjorn Helgaas
parent
7957d20145
commit
1aa85bb14d
@@ -1207,6 +1207,7 @@ int pci_power_up(struct pci_dev *dev)
|
||||
if (PCI_POSSIBLE_ERROR(pmcsr)) {
|
||||
pci_err(dev, "Unable to change power state from %s to D0, device inaccessible\n",
|
||||
pci_power_name(dev->current_state));
|
||||
dev->current_state = PCI_D3cold;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -1335,6 +1336,7 @@ static int pci_set_low_power_state(struct pci_dev *dev, pci_power_t state)
|
||||
pci_err(dev, "Unable to change power state from %s to %s, device inaccessible\n",
|
||||
pci_power_name(dev->current_state),
|
||||
pci_power_name(state));
|
||||
dev->current_state = PCI_D3cold;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user