netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Feldman <sfeldma@pobox.com>
To: "David Härdeman" <david@2gen.com>,
	"Michael Gernoth" <simigern@stud.uni-erlangen.de>
Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: 2.4.29, e100 and a WOL packet causes keventd going mad
Date: Sun, 30 Jan 2005 19:47:35 -0800	[thread overview]
Message-ID: <1107143255.18167.428.camel@localhost.localdomain> (raw)
In-Reply-To: <20050130171849.GA3354@hardeman.nu>

On Sun, 2005-01-30 at 09:18, David Härdeman wrote:
> I experience the same problems as reported by Michael Gernoth when 
> sending a WOL-packet to computer with a e100 NIC which is already 
> powered on.

I didn't look at the 2.4 case, but for 2.6, it seems e100 was enabling
PME wakeup during probe.  PME shouldn't be enabled while the system is
up.  I suspect the assertion of PME while the system is up is what's
causing problems.  This patch moves PME wakeup enabling to either
suspend or shutdown.

David, would you give this patch a try?  Make sure the system still
wakes from a magic packet if suspended or shut down, and doesn't cause
kacpid to go crazy if system is running.  If it helps for 2.6, perhaps
someone can look into 2.4 to see if there is something similar going on
there.

-scott

--- linux-2.6.11-rc2/drivers/net/e100.c.orig	2005-01-30 19:13:56.850497376 -0800
+++ linux-2.6.11-rc2/drivers/net/e100.c	2005-01-30 19:26:41.154305536 -0800
@@ -1868,7 +1868,6 @@ static int e100_set_wol(struct net_devic
 	else
 		nic->flags &= ~wol_magic;
 
-	pci_enable_wake(nic->pdev, 0, nic->flags & (wol_magic | e100_asf(nic)));
 	e100_exec_cb(nic, NULL, e100_configure);
 
 	return 0;
@@ -2262,8 +2261,6 @@ static int __devinit e100_probe(struct p
 	   (nic->eeprom[eeprom_id] & eeprom_id_wol))
 		nic->flags |= wol_magic;
 
-	pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic)));
-
 	strcpy(netdev->name, "eth%d");
 	if((err = register_netdev(netdev))) {
 		DPRINTK(PROBE, ERR, "Cannot register net device, aborting.\n");
@@ -2344,6 +2341,15 @@ static int e100_resume(struct pci_dev *p
 }
 #endif
 
+static void e100_shutdown(struct device *dev)
+{
+	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct net_device *netdev = pci_get_drvdata(pdev);
+	struct nic *nic = netdev_priv(netdev);
+
+	pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic)));
+}
+
 static struct pci_driver e100_driver = {
 	.name =         DRV_NAME,
 	.id_table =     e100_id_table,
@@ -2353,6 +2359,9 @@ static struct pci_driver e100_driver = {
 	.suspend =      e100_suspend,
 	.resume =       e100_resume,
 #endif
+	.driver = {
+		.shutdown = e100_shutdown,
+	}
 };
 
 static int __init e100_init_module(void)

  reply	other threads:[~2005-01-31  3:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 17:18 2.4.29, e100 and a WOL packet causes keventd going mad David Härdeman
2005-01-31  3:47 ` Scott Feldman [this message]
2005-01-31  3:58   ` Nigel Cunningham
2005-01-31  5:00     ` Scott Feldman
2005-01-31  6:14       ` Nigel Cunningham
2005-01-31  9:08         ` Nigel Cunningham
2005-01-31  4:23   ` Bukie Mabayoje
2005-01-31 15:24     ` Marcelo Tosatti
2005-01-31 20:29       ` David Härdeman
2005-01-31 21:13       ` Bukie Mabayoje
  -- strict thread matches above, loose matches on Subject: below --
2005-01-31 19:26 Brandeburg, Jesse
2005-01-31 20:57 ` Bukie Mabayoje

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=1107143255.18167.428.camel@localhost.localdomain \
    --to=sfeldma@pobox.com \
    --cc=david@2gen.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=simigern@stud.uni-erlangen.de \
    /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;
as well as URLs for NNTP newsgroup(s).