From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 1/6] PCI/PM: Apply D2 delay as milliseconds, not microseconds
Date: Mon, 4 Nov 2019 11:29:03 +0100 [thread overview]
Message-ID: <CAJZ5v0ihZTc_e7ORcAWFOYvLdc9keO2evRYxr9qz-w8WkQtEhQ@mail.gmail.com> (raw)
In-Reply-To: <20191101204558.210235-2-helgaas@kernel.org>
On Fri, Nov 1, 2019 at 9:46 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> PCI_PM_D2_DELAY is defined as 200, which is milliseconds, but previously we
> used udelay(), which only waited for 200 microseconds. Use msleep()
> instead so we wait the correct amount of time. See PCIe r5.0, sec 5.9.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/pci/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index e7982af9a5d8..cd96874ae76d 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -886,7 +886,7 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
> if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
> pci_dev_d3_sleep(dev);
> else if (state == PCI_D2 || dev->current_state == PCI_D2)
> - udelay(PCI_PM_D2_DELAY);
> + msleep(PCI_PM_D2_DELAY);
>
> pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
> dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
> --
> 2.24.0.rc1.363.gb1bccd3e3d-goog
>
next prev parent reply other threads:[~2019-11-04 10:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 20:45 [PATCH 0/6] PCI/PM: Minor fix and cleanups Bjorn Helgaas
2019-11-01 20:45 ` [PATCH 1/6] PCI/PM: Apply D2 delay as milliseconds, not microseconds Bjorn Helgaas
2019-11-04 10:29 ` Rafael J. Wysocki [this message]
2019-11-01 20:45 ` [PATCH 2/6] PCI/PM: Expand PM reset messages to mention D3hot (not just D3) Bjorn Helgaas
2019-11-04 10:29 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 3/6] PCI/PM: Simplify pci_set_power_state() Bjorn Helgaas
2019-11-04 10:31 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 4/6] xen-platform: Convert to generic power management Bjorn Helgaas
2019-11-04 10:32 ` Rafael J. Wysocki
2019-11-04 15:23 ` Bjorn Helgaas
2019-11-05 21:51 ` Bjorn Helgaas
2019-11-01 20:45 ` [PATCH 5/6] PCI/PM: Remove unused pci_driver.resume_early() hook Bjorn Helgaas
2019-11-04 10:33 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 6/6] PCI/PM: Remove unused pci_driver.suspend_late() hook Bjorn Helgaas
2019-11-04 10:34 ` Rafael J. Wysocki
2019-11-05 21:52 ` [PATCH 0/6] PCI/PM: Minor fix and cleanups Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJZ5v0ihZTc_e7ORcAWFOYvLdc9keO2evRYxr9qz-w8WkQtEhQ@mail.gmail.com \
--to=rafael@kernel.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).