From: Li Shaohua <shaohua.li@intel.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH]eepro100 resume failure
Date: Mon, 15 Nov 2004 16:46:50 +0800 [thread overview]
Message-ID: <1100508410.32025.2.camel@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <1100508226.2936.11.camel@laptop.fenrus.org>
[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]
On Mon, 2004-11-15 at 16:43, Arjan van de Ven wrote:
> >
> > @@ -2337,7 +2337,12 @@ static int eepro100_resume(struct pci_de
> > struct speedo_private *sp = netdev_priv(dev);
> > long ioaddr = dev->base_addr;
> >
> > + pci_set_power_state(pdev, 0);
> > pci_restore_state(pdev);
> > + if (pdev->is_enabled)
> > + pci_enable_device(pdev);
> > + if (pdev->is_busmaster)
> > + pci_set_master(pdev);
>
> this is wrong; the driver should KNOW the device is enabled; no reason
> to check for is_enabled. Same for is_busmaster...
Oh, yes. The check isn't required. Updated one.
Thanks,
Shaohua
---
2.6-root/drivers/net/eepro100.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -puN drivers/net/eepro100.c~eepro100-pm drivers/net/eepro100.c
--- 2.6/drivers/net/eepro100.c~eepro100-pm 2004-11-15 16:06:22.500880880 +0800
+++ 2.6-root/drivers/net/eepro100.c 2004-11-15 16:40:47.211997080 +0800
@@ -2327,7 +2327,8 @@ static int eepro100_suspend(struct pci_d
netif_device_detach(dev);
outl(PortPartialReset, ioaddr + SCBPort);
- /* XXX call pci_set_power_state ()? */
+ pci_disable_device(pdev);
+ pci_set_power_state (pdev, 3);
return 0;
}
@@ -2337,7 +2338,10 @@ static int eepro100_resume(struct pci_de
struct speedo_private *sp = netdev_priv(dev);
long ioaddr = dev->base_addr;
+ pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
+ pci_enable_device(pdev);
+ pci_set_master(pdev);
if (!netif_running(dev))
return 0;
_
[-- Attachment #2: eepro100-pm.patch --]
[-- Type: text/x-patch, Size: 880 bytes --]
---
2.6-root/drivers/net/eepro100.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -puN drivers/net/eepro100.c~eepro100-pm drivers/net/eepro100.c
--- 2.6/drivers/net/eepro100.c~eepro100-pm 2004-11-15 16:06:22.500880880 +0800
+++ 2.6-root/drivers/net/eepro100.c 2004-11-15 16:40:47.211997080 +0800
@@ -2327,7 +2327,8 @@ static int eepro100_suspend(struct pci_d
netif_device_detach(dev);
outl(PortPartialReset, ioaddr + SCBPort);
- /* XXX call pci_set_power_state ()? */
+ pci_disable_device(pdev);
+ pci_set_power_state (pdev, 3);
return 0;
}
@@ -2337,7 +2338,10 @@ static int eepro100_resume(struct pci_de
struct speedo_private *sp = netdev_priv(dev);
long ioaddr = dev->base_addr;
+ pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
+ pci_enable_device(pdev);
+ pci_set_master(pdev);
if (!netif_running(dev))
return 0;
_
next prev parent reply other threads:[~2004-11-15 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-15 8:30 Li Shaohua
2004-11-15 8:43 ` Arjan van de Ven
2004-11-15 8:46 ` Li Shaohua [this message]
2004-11-15 8:58 ` Arjan van de Ven
2004-11-15 8:54 ` Li Shaohua
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=1100508410.32025.2.camel@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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®