mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li Shaohua <shaohua.li@intel.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Jeff Garzik <jgarzik@pobox.com>
Subject: [PATCH]eepro100 resume failure
Date: Mon, 15 Nov 2004 16:30:50 +0800	[thread overview]
Message-ID: <1100507449.31599.9.camel@sli10-desk.sh.intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi,
After resume from S3, eepro100 driver reported some errors and stop working in my Toshiba
laptop. Below patch fixes it.

Thanks,
Shaohua


Signed-off-by: Li Shaohua<shaohua.li@intel.com>
---

 2.6-root/drivers/net/eepro100.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/net/eepro100.c~eepro100-pm drivers/net/eepro100.c
--- 2.6/drivers/net/eepro100.c~eepro100-pm	2004-11-15 16:06:22.500880880 +0800
+++ 2.6-root/drivers/net/eepro100.c	2004-11-15 16:16:43.057541928 +0800
@@ -2327,7 +2327,7 @@ static int eepro100_suspend(struct pci_d
 	netif_device_detach(dev);
 	outl(PortPartialReset, ioaddr + SCBPort);
 	
-	/* XXX call pci_set_power_state ()? */
+	pci_set_power_state (pdev, 3);
 	return 0;
 }
 
@@ -2337,7 +2337,12 @@ static int eepro100_resume(struct pci_de
 	struct speedo_private *sp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
 
+	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev);
+	if (pdev->is_enabled)
+		pci_enable_device(pdev);
+	if (pdev->is_busmaster)
+		pci_set_master(pdev);
 
 	if (!netif_running(dev))
 		return 0;
_


[-- Attachment #2: eepro100-pm.patch --]
[-- Type: text/x-patch, Size: 905 bytes --]



---

 2.6-root/drivers/net/eepro100.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/net/eepro100.c~eepro100-pm drivers/net/eepro100.c
--- 2.6/drivers/net/eepro100.c~eepro100-pm	2004-11-15 16:06:22.500880880 +0800
+++ 2.6-root/drivers/net/eepro100.c	2004-11-15 16:16:43.057541928 +0800
@@ -2327,7 +2327,7 @@ static int eepro100_suspend(struct pci_d
 	netif_device_detach(dev);
 	outl(PortPartialReset, ioaddr + SCBPort);
 	
-	/* XXX call pci_set_power_state ()? */
+	pci_set_power_state (pdev, 3);
 	return 0;
 }
 
@@ -2337,7 +2337,12 @@ static int eepro100_resume(struct pci_de
 	struct speedo_private *sp = netdev_priv(dev);
 	long ioaddr = dev->base_addr;
 
+	pci_set_power_state(pdev, 0);
 	pci_restore_state(pdev);
+	if (pdev->is_enabled)
+		pci_enable_device(pdev);
+	if (pdev->is_busmaster)
+		pci_set_master(pdev);
 
 	if (!netif_running(dev))
 		return 0;
_

             reply	other threads:[~2004-11-15  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-15  8:30 Li Shaohua [this message]
2004-11-15  8:43 ` Arjan van de Ven
2004-11-15  8:46   ` Li Shaohua
2004-11-15  8:58     ` Arjan van de Ven
2004-11-15  8:54       ` Li Shaohua

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=1100507449.31599.9.camel@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®