mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* eepro100 pm fix (fwd)
@ 2001-11-12 12:50 Andrey Savochkin
  0 siblings, 0 replies; only message in thread
From: Andrey Savochkin @ 2001-11-12 12:50 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Jens Axboe, Andrew Morton

Linus,

Could you apply it, please?

	Andrey

----- Forwarded message from Jens Axboe <axboe@suse.de> -----

Date: Mon, 12 Nov 2001 13:24:53 +0100
From: Jens Axboe <axboe@suse.de>
To: saw@saw.sw.com.sg
Subject: eepro100 pm fix
Message-ID: <20011112132453.B786@suse.de>

Hi Andrey,

This patch posted by Andrew Morton makes the eepro100 actually survive a
apm suspend and resume without totally croaking (a problem I reported
probably a year or so ago :-). Any chance you could include it?

-- 
Jens Axboe


--- /opt/kernel/linux-2.4.15-pre3/drivers/net/eepro100.c	Mon Nov 12 13:21:27 2001
+++ linux/drivers/net/eepro100.c	Mon Nov 12 13:20:47 2001
@@ -499,6 +499,9 @@
 	unsigned short phy[2];				/* PHY media interfaces available. */
 	unsigned short advertising;			/* Current PHY advertised caps. */
 	unsigned short partner;				/* Link partner caps. */
+#ifdef CONFIG_PM
+	u32 pm_state[16];
+#endif
 };
 
 /* The parameters for a CmdConfigure operation.
@@ -2193,8 +2196,11 @@
 static int eepro100_suspend(struct pci_dev *pdev, u32 state)
 {
 	struct net_device *dev = pci_get_drvdata (pdev);
+	struct speedo_private *sp = (struct speedo_private *)dev->priv;
 	long ioaddr = dev->base_addr;
 
+	pci_save_state(pdev, sp->pm_state);
+
 	if (!netif_running(dev))
 		return 0;
 
@@ -2210,6 +2216,8 @@
 	struct net_device *dev = pci_get_drvdata (pdev);
 	struct speedo_private *sp = (struct speedo_private *)dev->priv;
 	long ioaddr = dev->base_addr;
+
+	pci_restore_state(pdev, sp->pm_state);
 
 	if (!netif_running(dev))
 		return 0;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-12 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-12 12:50 eepro100 pm fix (fwd) Andrey Savochkin

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®