From: Andrew Morton <akpm@zip.com.au>
To: Sam Vilain <sam@vilain.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: eepro100 quirk with APM suspend on Dell laptops
Date: Mon, 29 Oct 2001 21:17:48 -0800 [thread overview]
Message-ID: <3BDE37FC.BBF70C5D@zip.com.au> (raw)
In-Reply-To: <E15yQd9-0005Rm-00@hoffman.vilain.net>
Sam Vilain wrote:
>
> Hi there,
>
> With the earlier discussion about the eepro100 vs the e100, and with
> hotplug PCI going into the -ac series kernel, I think it's topical I
> discuss an APM related quirk.
>
> If you buy a Dell Inspiron with the inbuilt ethernet option, you get a PCI
> eepro100. If you suspend and resume, however, the card seems to be in a
> funny state that an rmmod/modprobe won't fix.
>
> I worked around the problem, by adding to the APM config this pre-suspend
> action:
>
> ifdown eth0
> rmmod eepro100
>
> And to the resume action:
>
> setpci -s8:4 4=17 5=1 c=8 d=20 11=f0 12=ff 13=fb \
> 14=c1 15=dc 1a=e0 1b=fb 33=fc 3c=b
Heh. That's inventive.
Does the following (untested) patch fix it?
--- linux-2.4.14-pre5/drivers/net/eepro100.c Tue Oct 9 21:31:38 2001
+++ linux-akpm/drivers/net/eepro100.c Mon Oct 29 21:15:52 2001
@@ -497,6 +497,9 @@ struct speedo_private {
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.
@@ -2160,8 +2163,11 @@ static void set_rx_mode(struct net_devic
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;
@@ -2177,6 +2183,8 @@ static int eepro100_resume(struct pci_de
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;
next prev parent reply other threads:[~2001-10-30 5:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-30 4:36 eepro100 quirk with APM suspend on Dell laptops Sam Vilain
2001-10-30 5:17 ` Andrew Morton [this message]
2001-10-30 7:56 ` arjan
2001-10-30 16:44 ` Alex Bligh - linux-kernel
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=3BDE37FC.BBF70C5D@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@vilain.net \
/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