Netdev List
 help / color / mirror / Atom feed
From: "Joonwoo Park" <joonwpark81@gmail.com>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Kexec Mailing List" <kexec@lists.infradead.org>,
	"Simon Arlott" <simon@fire.lp0.eu>
Cc: "Pavel Machek" <pavel@ucw.cz>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	linux-pm@lists.linux-foundation.org, netdev@vger.kernel.org
Subject: [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 22:42:46 +0900	[thread overview]
Message-ID: <b25c3fa70708060642w1b3a326q792a81fdaa3036c5@mail.gmail.com> (raw)

Hi.
I think that the pci_set_power_state() has bug.
The specification says that some delays is required.

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);
    pci_restore_bars(dev);
+ }

  return 0;
 }


2007/8/6, Simon Arlott <simon@fire.lp0.eu>:
> On Mon, August 6, 2007 11:44, Pavel Machek wrote:
> > Hi!
> >
> >> >00:0a.0 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet
> >> >Controller (Copper) (rev 01)
> >> >        Subsystem: Intel Corp.: Unknown device 1012
> >> >        Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 5
> >> >        Memory at e3020000 (64-bit, non-prefetchable) [size=128K]
> >> >        I/O ports at b000 [size=64]
> >> >        Capabilities: [dc] Power Management version 2
> >> >        Capabilities: [e4] PCI-X non-bridge device.
> >> >        Capabilities: [f0] Message Signalled Interrupts: 64bit+ Queue=0/0
> >> >        Enable-
> >> >
> >> >00:0a.1 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet
> >> >Controller (Copper) (rev 01)
> >> >        Subsystem: Intel Corp.: Unknown device 1012
> >> >        Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 12
> >> >        Memory at e3000000 (64-bit, non-prefetchable) [size=128K]
> >> >        I/O ports at b400 [size=64]
> >> >        Capabilities: [dc] Power Management version 2
> >> >        Capabilities: [e4] PCI-X non-bridge device.
> >> >        Capabilities: [f0] Message Signalled Interrupts: 64bit+ Queue=0/0
> >> >        Enable-
> >> >
> >> >[  950.132046] Stopping tasks ... done.
> >> >[  950.459794] Suspending console(s)
> >> >[  951.776277] pnp: Device 00:0c disabled.
> >> >[  951.776673] pnp: Device 00:0a disabled.
> >> >[  951.776984] pnp: Device 00:09 disabled.
> >> >[  951.777306] pnp: Device 00:08 disabled.
> >> >[  951.777786] ACPI: PCI interrupt for device 0000:00:11.5 disabled
> >> >[  951.995359] ACPI: PCI interrupt for device 0000:00:11.3 disabled
> >> >[  952.006094] ACPI: PCI interrupt for device 0000:00:11.2 disabled
> >> >[  952.022243] ACPI handle has no context!
> >> >[  952.033068] ACPI: PCI interrupt for device 0000:00:0c.2 disabled
> >> >[  952.044086] ACPI: PCI interrupt for device 0000:00:0c.1 disabled
> >> >[  952.055083] ACPI: PCI interrupt for device 0000:00:0c.0 disabled
> >> >[  952.282211] ACPI: PCI interrupt for device 0000:00:0a.1 disabled
> >> >[  952.282221] ACPI handle has no context!
> >> >[  952.537474] ACPI: PCI interrupt for device 0000:00:0a.0 disabled
> >> >[  952.537495] ACPI handle has no context!
> >> >
> >> >[  956.857085] Back to C!
> >
> > Are you sure that is standby? Looks like suspend-to-RAM to me.
>
> It's S1 (power-on suspend/standby), my BIOS/motherboard doesn't support S2 or S3.
>
> --
> Simon Arlott
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

                 reply	other threads:[~2007-08-06 13:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=b25c3fa70708060642w1b3a326q792a81fdaa3036c5@mail.gmail.com \
    --to=joonwpark81@gmail.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=netdev@vger.kernel.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