mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]eepro100 resume failure
@ 2004-11-15  8:30 Li Shaohua
  2004-11-15  8:43 ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Li Shaohua @ 2004-11-15  8:30 UTC (permalink / raw)
  To: lkml; +Cc: Andrew Morton, Jeff Garzik

[-- 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;
_

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-15  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15  8:30 [PATCH]eepro100 resume failure Li Shaohua
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

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®