All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karol Lewandowski <karol.k.lewandowski@gmail.com>
To: "Graham, David" <david.graham@intel.com>
Cc: Karol Lewandowski <karol.k.lewandowski@gmail.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"e1000-devel@lists.sourceforge.net" 
	<e1000-devel@lists.sourceforge.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [E1000-devel] [BUG 2.6.30+] e100 sometimes causes oops during resume
Date: Wed, 16 Sep 2009 03:44:48 +0200	[thread overview]
Message-ID: <20090916014448.GA1070@bizet.domek.prywatny> (raw)
In-Reply-To: <13830B75AD5A2F42848F92269B11996F5BF592C3@orsmsx509.amr.corp.intel.com>

On Tue, Sep 15, 2009 at 03:54:20PM -0700, Graham, David wrote:

> A v2.6.30..v2.6.31 diff shows that this is probably exposed by
> Rafael Wysocki's commit 6905b1f1, which now allows systems with e100
> to sleep. If I understand correctly, it looks like these systems
> simply couldn't sleep before. Is that right Rafael?.

Probably true, but that wasn't the case for my (I guess
ACPI-controlled) system.


> I don't think its likely that the commit is a direct cause of the
> problem, but that the suspend/resume cycle now allows us to see
> another issue.

>From my (very limited) understanding commit message is at least in
conflict with patch body.

Precisely patch was supposed to "Fix this problem by ignoring the
return value of pci_set_power_state() in __e100_power_off()."

That patch is doing something rather different -- it returns 0, yes,
but it also ignores 'wake' bool as set by __e100_shutdown().  That
seems wrong to me.


--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2895,12 +2895,13 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
 
 static int __e100_power_off(struct pci_dev *pdev, bool wake)
 {
-       if (wake) {
+       if (wake)
                return pci_prepare_to_sleep(pdev);
-       } else {
-               pci_wake_from_d3(pdev, false);
-               return pci_set_power_state(pdev, PCI_D3hot);
-       }
+
+       pci_wake_from_d3(pdev, false);
+       pci_set_power_state(pdev, PCI_D3hot);
+
+       return 0;
 }


Correct patch would be that (hand-made), right?


+++ b/drivers/net/e100.c
@@ -2895,12 +2895,13 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
 
 static int __e100_power_off(struct pci_dev *pdev, bool wake)
 {
        if (wake) {
                return pci_prepare_to_sleep(pdev);
        } else {
                pci_wake_from_d3(pdev, false);
-               return pci_set_power_state(pdev, PCI_D3hot);
+               pci_set_power_state(pdev, PCI_D3hot);
        }
+
+       return 0;
 }

I can test, or rather -- start testing this tommorow, if this makes
sense to you.

Thanks.

  reply	other threads:[~2009-09-16  1:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 12:05 [BUG 2.6.30+] e100 sometimes causes oops during resume Karol Lewandowski
2009-09-15 15:32 ` Karol Lewandowski
2009-09-15 22:54 ` [E1000-devel] " Graham, David
2009-09-15 22:54   ` Graham, David
2009-09-16  1:44   ` Karol Lewandowski [this message]
2009-09-16  1:44     ` [E1000-devel] " Karol Lewandowski
2009-09-16  9:19     ` Karol Lewandowski
2009-09-16  9:19       ` Karol Lewandowski
2009-09-16 21:06     ` Graham, David
2009-09-16 21:06       ` Graham, David
2009-09-16 21:17       ` [E1000-devel] " Karol Lewandowski
2009-09-16 21:17         ` Karol Lewandowski
2009-09-16 23:11   ` Rafael J. Wysocki
2009-09-16 23:11     ` Rafael J. Wysocki
2009-09-16 23:18 ` Rafael J. Wysocki
2009-09-17 20:42   ` Graham, David
2009-09-17 22:27     ` Rafael J. Wysocki
2009-09-17 22:27       ` Rafael J. Wysocki
2009-09-22 23:35       ` Karol Lewandowski
2009-09-22 23:35         ` Karol Lewandowski
2009-09-22 23:51         ` Rafael J. Wysocki
2009-09-22 23:51           ` Rafael J. Wysocki
2009-09-23 14:22           ` Karol Lewandowski
2009-09-23 14:22             ` Karol Lewandowski
2009-09-23 21:45             ` Rafael J. Wysocki
2009-09-23 21:45               ` Rafael J. Wysocki
2009-09-29 13:58         ` Mel Gorman
2009-09-29 13:58           ` Mel Gorman
2009-09-30 15:37           ` Karol Lewandowski
2009-09-30 15:37             ` Karol Lewandowski
2009-09-30 15:55             ` Mel Gorman
2009-09-30 15:55               ` Mel Gorman
2009-09-30 18:48               ` Karol Lewandowski
2009-09-30 18:48                 ` Karol Lewandowski
2009-09-17 23:05     ` Karol Lewandowski

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=20090916014448.GA1070@bizet.domek.prywatny \
    --to=karol.k.lewandowski@gmail.com \
    --cc=david.graham@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.