mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Joonwoo Park" <joonwpark81@gmail.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Simon Arlott" <simon@fire.lp0.eu>, "Pavel Machek" <pavel@ucw.cz>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] kexec: fix pci device initialization fail after kexec (2.6.23-rc2). (Related to e1000 doesn't resume properly from standby)
Date: Mon, 6 Aug 2007 16:50:15 +0200	[thread overview]
Message-ID: <200708061650.16555.rjw@sisk.pl> (raw)
In-Reply-To: <b25c3fa70708060642w1b3a326q792a81fdaa3036c5@mail.gmail.com>

On Monday, 6 August 2007 15:42, Joonwoo Park wrote:
> Hi.
> I think that the pci_set_power_state() has bug.
> The specification says that some delays is required.

And they are in place, AFAICS (from drivers/pci/pci.c):

	/* Mandatory power management transition delays */
	/* see PCI PM 1.1 5.6.1 table 18 */
	if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
		msleep(pci_pm_d3_delay);
	else if (state == PCI_D2 || dev->current_state == PCI_D2)
		udelay(200);

> Simon, please can I know whether it works to you?
> It is seems to the things are related.
> 
> Joonwoo Park.
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 37c00f6..9f78064 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -493,8 +493,14 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
>    * restore at least the BARs so that the device will be
>    * accessible to its driver.
>    */
> - if (need_restore)
> + if (need_restore) {
> +   /* The specification also says that "Must ensure that all of
> +    * its PCI signal drivers remain disabled for the duration of
> +    * the D3hot to D0 Uninitialized state transition".
> +    */
> +   msleep(10);

It's too late for the delay.

>     pci_restore_bars(dev);
> + }
> 
>   return 0;
>  }

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-08-06 14:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 13:42 Joonwoo Park
2007-08-06 14:50 ` Rafael J. Wysocki [this message]
2007-08-06 15:50   ` Joonwoo Park
2007-08-06 17:18     ` Simon Arlott
2007-08-06 18:48     ` Rafael J. Wysocki
2007-08-06 20:54       ` [linux-pm] " David Brownell
2007-08-07  4:30       ` Joonwoo Park
2007-08-07 13:51         ` Rafael J. Wysocki

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=200708061650.16555.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=auke-jan.h.kok@intel.com \
    --cc=joonwpark81@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=simon@fire.lp0.eu \
    /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

all inboxes | Powered by JetHome®