rpms/kernel/FC-4 jwltest-3c59x-resume.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.1387.2.1, 1.1387.2.2

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jul 1 21:33:17 UTC 2005


Author: linville

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv1246

Modified Files:
      Tag: private-linville-fc4-jwltest-10-branch
	kernel-2.6.spec 
Added Files:
      Tag: private-linville-fc4-jwltest-10-branch
	jwltest-3c59x-resume.patch 
Log Message:


jwltest-3c59x-resume.patch:
 3c59x.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

--- NEW FILE jwltest-3c59x-resume.patch ---
--- linux-2.6.12/drivers/net/3c59x.c.orig	2005-07-01 17:04:31.254440604 -0400
+++ linux-2.6.12/drivers/net/3c59x.c	2005-07-01 17:26:11.163398335 -0400
@@ -795,7 +795,6 @@ struct vortex_private {
 		partner_flow_ctrl:1,			/* Partner supports flow control */
 		has_nway:1,
 		enable_wol:1,					/* Wake-on-LAN is enabled */
-		pm_state_valid:1,				/* pci_dev->saved_config_space has sane contents */
 		open:1,
 		medialock:1,
 		must_free_region:1,				/* Flag: if zero, Cardbus owns the I/O region */
@@ -1523,7 +1522,6 @@ static int __devinit vortex_probe1(struc
 	dev->poll_controller = poll_vortex; 
 #endif
 	if (pdev) {
-		vp->pm_state_valid = 1;
  		pci_save_state(VORTEX_PCI(vp));
  		acpi_set_WOL(dev);
 	}
@@ -1580,10 +1578,8 @@ vortex_up(struct net_device *dev)
 	int i;
 
 	if (VORTEX_PCI(vp)) {
-		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
-		if (vp->pm_state_valid)
-			pci_restore_state(VORTEX_PCI(vp));
 		pci_enable_device(VORTEX_PCI(vp));
+		pci_restore_state(VORTEX_PCI(vp));
 	}
 
 	/* Before initializing select the active media port. */
@@ -2742,7 +2738,6 @@ vortex_down(struct net_device *dev, int 
 		outl(0, ioaddr + DownListPtr);
 
 	if (final_down && VORTEX_PCI(vp)) {
-		vp->pm_state_valid = 1;
 		pci_save_state(VORTEX_PCI(vp));
 		acpi_set_WOL(dev);
 	}
@@ -3051,7 +3046,7 @@ static int vortex_ioctl(struct net_devic
 	/* The kernel core really should have pci_get_power_state() */
 
 	if(state != 0)
-		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);
+		pci_enable_device(VORTEX_PCI(vp));
 	spin_lock_irqsave(&vp->lock, flags);
 	EL3WINDOW(4);
 	err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL);
@@ -3271,9 +3266,8 @@ static void __devexit vortex_remove_one 
 	unregister_netdev(dev);
 
 	if (VORTEX_PCI(vp)) {
-		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */
-		if (vp->pm_state_valid)
-			pci_restore_state(VORTEX_PCI(vp));
+		pci_enable_device(VORTEX_PCI(vp)); /* necessary */
+		pci_restore_state(VORTEX_PCI(vp));
 		pci_disable_device(VORTEX_PCI(vp));
 	}
 	/* Should really use issue_and_wait() here */


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1387.2.1
retrieving revision 1.1387.2.2
diff -u -r1.1387.2.1 -r1.1387.2.2
--- kernel-2.6.spec	1 Jul 2005 21:02:04 -0000	1.1387.2.1
+++ kernel-2.6.spec	1 Jul 2005 21:33:03 -0000	1.1387.2.2
@@ -309,6 +309,7 @@
 Patch1302: linux-2.6.12-net-make-orinoco-suck-less.patch
 Patch1304: linux-2.6.12-net-atm-lanai-nodev-rmmod.patch
 Patch1305: jwltest-b44-link-check.patch
+Patch1306: jwltest-3c59x-resume.patch
 
 # USB bits
 Patch1400: linux-2.6.12-usb-old_scheme_first.patch
@@ -733,6 +734,8 @@
 %patch1304 -p1
 # b44 early link check
 %patch1305 -p1
+# fix 3c59x resume, use pci_enable_device for wake-up
+%patch1306 -p1
 
 # USB Bits.
 # Enable both old and new style USB initialisation.




More information about the fedora-cvs-commits mailing list