public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: Aleksey Gorelov <dared1st@yahoo.com>
Cc: Ryan Richter <ryan@tau.solarneutrino.net>,
	Lukas Hejtmanek <xhejtman@mail.muni.cz>,
	linux-kernel@vger.kernel.org, auke-jan.h.kok@intel.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"Ronciak, John" <john.ronciak@intel.com>
Subject: Re: Machine restart doesn't work - Intel 965G, 2.6.19-rc2 / e1000?
Date: Tue, 17 Oct 2006 14:17:04 -0700	[thread overview]
Message-ID: <45354850.6050900@intel.com> (raw)
In-Reply-To: <20061017205316.25914.qmail@web83109.mail.mud.yahoo.com>

Aleksey Gorelov wrote:
> 
> --- Ryan Richter <ryan@tau.solarneutrino.net> wrote:
>> 2.6.19-rc1-git9 doesn't work any better for me.  I haven't tried
>> unloading the e1000 module yet.  Since I run the machine off an nfsroot,
>> it will require some creativity to test that.
>>
>> -ryan
> 
> You may try the following patch instead if it's easier for you. It'll likely break suspend stuff,
> but you won't need to play around with modules.
> 
> Aleks.
> 
> --- linux-2.6.19-rc2/drivers/net/e1000/e1000_main.c.orig	2006-10-17 13:36:06.000000000 -0700
> +++ linux-2.6.19-rc2/drivers/net/e1000/e1000_main.c	2006-10-17 13:36:50.000000000 -0700
> @@ -4847,6 +4847,7 @@
>  static void e1000_shutdown(struct pci_dev *pdev)
>  {
>  	e1000_suspend(pdev, PMSG_SUSPEND);
> +	pci_set_power_state(pdev, PCI_D0);
>  }
>  
>  #ifdef CONFIG_NET_POLL_CONTROLLER

I wouldn't do that like this, since e1000_suspend already does a pci_set_power_state() 
right before it exits, and doing two of those closely after another might result in an 
undetermined state.

I would be more interested in forcing D3 state instead of the current 
`pci_set_power_state(pdev, pci_choose_state(pdev, state));` in e1000_suspend, so can you 
try this instead?

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ce0d35f..30ceeec 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4793,7 +4793,7 @@ #endif

         pci_disable_device(pdev);

-       pci_set_power_state(pdev, pci_choose_state(pdev, state));
+       pci_set_power_state(pdev, PCI_D3hot);

         return 0;
  }


alternatively, you can try PCI_D3cold or PCI_D0, but setting the device to D0 is a 
no-op: the device is already in D0 at run-time, so that's silly.

In any case: this is not a driver bug, but really (unfortunately) a platform issue, so 
this fix is not suitable for general cases *at all*, and we'd have to validate this 
nasty workaround on all other chipsets that e1000 supports too, something that ain't 
going to happen I'm sure.

constructive: I've just spend some time working with e100+suspend+shutdown+netconsole, 
so I'll audit e1000 for that in the next few weeks and make sure that all works 
properly. Perhaps that yields something for you.

Cheers,

Auke

  reply	other threads:[~2006-10-17 21:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 21:40 Machine restart doesn't work - Intel 965G, 2.6.19-rc2 Aleksey Gorelov
2006-10-13 21:42 ` Ryan Richter
2006-10-13 21:45   ` Lukas Hejtmanek
2006-10-13 21:46     ` Ryan Richter
2006-10-13 21:49       ` Lukas Hejtmanek
2006-10-13 21:51         ` Ryan Richter
2006-10-17 18:00         ` Ryan Richter
2006-10-17 20:53           ` Aleksey Gorelov
2006-10-17 21:17             ` Auke Kok [this message]
2006-10-17 22:14               ` Machine restart doesn't work - Intel 965G, 2.6.19-rc2 / e1000? dared1st
2007-11-20 14:38               ` e1000 driver problems Lukas Hejtmanek
2007-11-26 23:26                 ` Kok, Auke
2007-11-27 15:07                   ` Lukas Hejtmanek
2007-11-27 16:48                     ` Kok, Auke
2007-11-27 17:31                       ` Lukas Hejtmanek
2006-10-17 22:27             ` Machine restart doesn't work - Intel 965G, 2.6.19-rc2 Ryan Richter
2006-10-20 17:57               ` Auke Kok
2006-10-20 18:06                 ` Lukas Hejtmanek
2006-10-21 17:34                   ` Ryan Richter
2006-10-21 17:56                     ` Auke Kok
2006-10-20 18:07                 ` Ryan Richter
2006-10-20 18:17                   ` Auke Kok
2006-10-20 18:29                     ` Lukas Hejtmanek
2006-10-23 20:52                   ` Aleksey Gorelov
2006-10-13 21:50       ` Aleksey Gorelov

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=45354850.6050900@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=dared1st@yahoo.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ryan@tau.solarneutrino.net \
    --cc=xhejtman@mail.muni.cz \
    /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