[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 05 May 2022 20:04:07 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PCI <linux-pci@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Bjorn Helgaas <helgaas@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Anders Roxell <anders.roxell@...aro.org>
Subject: [PATCH v1 03/11] PCI/PM: Set current_state to D3cold if the device is not accessible
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
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().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/pci/pci.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-pm/drivers/pci/pci.c
===================================================================
--- linux-pm.orig/drivers/pci/pci.c
+++ linux-pm/drivers/pci/pci.c
@@ -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(struc
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;
}
Powered by blists - more mailing lists