[kernel] r7644 - in dists/trunk/linux-2.6/debian: . patches/features patches/series

maximilian attems maks-guest at costa.debian.org
Tue Oct 24 15:00:29 UTC 2006


Author: maks-guest
Date: Tue Oct 24 15:00:29 2006
New Revision: 7644

Added:
   dists/trunk/linux-2.6/debian/patches/features/net-forcedeth-swsusp.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/4

Log:
backport forcedeth swsusp support


Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Tue Oct 24 15:00:29 2006
@@ -19,8 +19,9 @@
   [ maximilian attems ]
   * Add netpoll leak fix.
   * Add sky2 lookup patch for the Marvell 88E803X Yukon-FE chip.
+  * Add upstream forcedeth swsusp support.
 
- -- maximilian attems <maks at sternwelten.at>  Tue, 24 Oct 2006 16:52:12 +0200
+ -- maximilian attems <maks at sternwelten.at>  Tue, 24 Oct 2006 16:59:20 +0200
 
 linux-2.6 (2.6.18-3) unstable; urgency=low
 

Added: dists/trunk/linux-2.6/debian/patches/features/net-forcedeth-swsusp.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/features/net-forcedeth-swsusp.patch	Tue Oct 24 15:00:29 2006
@@ -0,0 +1,66 @@
+
+Francois Romieu:
+      forcedeth: restore network after swsup/resume or ACPI S3
+
+
+diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
+index 35467e0..c41a886 100644
+--- a/drivers/net/forcedeth.c
++++ b/drivers/net/forcedeth.c
+@@ -4603,6 +4603,47 @@ static void __devexit nv_remove(struct p
+ 	pci_set_drvdata(pci_dev, NULL);
+ }
+ 
++
++static int nv_suspend(struct pci_dev *pdev, pm_message_t state)
++{
++	struct net_device *dev = pci_get_drvdata(pdev);
++	struct fe_priv *np = netdev_priv(dev);
++	int rc = 0;
++
++	if (!netif_running(dev))
++		goto out;
++
++	netif_device_detach(dev);
++
++	/* Gross. */
++	rc = nv_close(dev);
++
++	pci_save_state(pdev);
++	pci_enable_wake(pdev, pci_choose_state(pdev, state), np->wolenabled);
++	pci_set_power_state(pdev, pci_choose_state(pdev, state));
++out:
++	return rc;
++}
++
++static int nv_resume(struct pci_dev *pdev)
++{
++	struct net_device *dev = pci_get_drvdata(pdev);
++	int rc = 0;
++
++	if (!netif_running(dev))
++		goto out;
++
++	netif_device_attach(dev);
++
++	pci_set_power_state(pdev, PCI_D0);
++	pci_restore_state(pdev);
++	pci_enable_wake(pdev, PCI_D0, 0);
++
++	rc = nv_open(dev);
++out:
++	return rc;
++}
++
+ static struct pci_device_id pci_tbl[] = {
+ 	{	/* nForce Ethernet Controller */
+ 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_1),
+@@ -4704,6 +4745,8 @@ static struct pci_driver driver = {
+ 	.id_table = pci_tbl,
+ 	.probe = nv_probe,
+ 	.remove = __devexit_p(nv_remove),
++	.suspend = nv_suspend,
++	.resume = nv_resume,
+ };
+ 
+ 

Modified: dists/trunk/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/4	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/4	Tue Oct 24 15:00:29 2006
@@ -3,3 +3,4 @@
 + bugfix/sparc/compat-alloc-user-space-alignment.patch
 + bugfix/net-netpoll.patch
 + bugfix/net-sky2-lockup.patch
++ features/net-forcedeth-swsusp.patch



More information about the Kernel-svn-changes mailing list