Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754067AbZIPBo7 (ORCPT ); Tue, 15 Sep 2009 21:44:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751935AbZIPBox (ORCPT ); Tue, 15 Sep 2009 21:44:53 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:60313 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbZIPBow (ORCPT ); Tue, 15 Sep 2009 21:44:52 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=juuF1EJ4CGxt88JTgJyl5/5sQ08x7hwg6qDIHwM7SDfu9le65NMGFPlxJkhyowNOMy 4gKrGvCnrUxi/BlwmNl7PGqmeXmAsGQTMMKDT4nPxwwcJnpTi0tAi8YjtXz71gGx9dMK pDuCPDduhUmozrzgr0SOFyX8zuvoaYsUBZwQ4= Date: Wed, 16 Sep 2009 03:44:48 +0200 From: Karol Lewandowski To: "Graham, David" Cc: Karol Lewandowski , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , "e1000-devel@lists.sourceforge.net" , "netdev@vger.kernel.org" Subject: Re: [E1000-devel] [BUG 2.6.30+] e100 sometimes causes oops during resume Message-ID: <20090916014448.GA1070@bizet.domek.prywatny> References: <20090915120538.GA26806@bizet.domek.prywatny> <13830B75AD5A2F42848F92269B11996F5BF592C3@orsmsx509.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13830B75AD5A2F42848F92269B11996F5BF592C3@orsmsx509.amr.corp.intel.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2340 Lines: 75 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. -- 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/