mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Savochkin <saw@saw.sw.com.sg>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@suse.de>,
	Andrew Morton <akpm@zip.com.au>
Subject: eepro100 pm fix (fwd)
Date: Mon, 12 Nov 2001 15:50:03 +0300	[thread overview]
Message-ID: <20011112155003.A26401@castle.nmd.msu.ru> (raw)

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;


                 reply	other threads:[~2001-11-12 12:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011112155003.A26401@castle.nmd.msu.ru \
    --to=saw@saw.sw.com.sg \
    --cc=akpm@zip.com.au \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®