patch-2.4.27 linux-2.4.27/drivers/net/8139too.c

Next file: linux-2.4.27/drivers/net/8390.c
Previous file: linux-2.4.27/drivers/net/8139cp.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/net/8139too.c linux-2.4.27/drivers/net/8139too.c
@@ -2482,6 +2482,8 @@
 	void *ioaddr = tp->mmio_addr;
 	unsigned long flags;
 
+	pci_save_state (pdev, tp->pci_state);
+
 	if (!netif_running (dev))
 		return 0;
 
@@ -2498,7 +2500,6 @@
 	RTL_W32 (RxMissed, 0);
 
 	pci_set_power_state (pdev, 3);
-	pci_save_state (pdev, tp->pci_state);
 
 	spin_unlock_irqrestore (&tp->lock, flags);
 	return 0;
@@ -2510,9 +2511,9 @@
 	struct net_device *dev = pci_get_drvdata (pdev);
 	struct rtl8139_private *tp = dev->priv;
 
+	pci_restore_state (pdev, tp->pci_state);
 	if (!netif_running (dev))
 		return 0;
-	pci_restore_state (pdev, tp->pci_state);
 	pci_set_power_state (pdev, 0);
 	rtl8139_init_ring (dev);
 	rtl8139_hw_start (dev);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)