From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alessandro Guido <alessandro.guido@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Jesse Barnes <jbarnes@virtuousgeek.org>,
pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: "e100_probe: Error clearing wake event" when booting 2.6.27-rc1
Date: Tue, 5 Aug 2008 22:03:07 +0200 [thread overview]
Message-ID: <200808052203.07815.rjw@sisk.pl> (raw)
In-Reply-To: <200808051730.27599.alessandro.guido@gmail.com>
On Tuesday, 5 of August 2008, Alessandro Guido wrote:
> [please cc me on replies]
>
> I'm getting this error message when booting my laptop.
>
> The commit that causes this is:
>
> commit eb9d0fe40e313c0a74115ef456a2e43a6c8da72f
> Author: Rafael J. Wysocki <rjw@sisk.pl>
> Date: Mon Jul 7 03:34:48 2008 +0200
>
> PCI ACPI: Rework PCI handling of wake-up
>
> [very long commit message snipped]
>
> Should I ignore that?
The message is harmless, but it exposes the problem that e100_probe() should
not use pci_enable_wake() for this purpose.
The appended patch makes it use pci_pme_active() instead.
Thanks,
Rafael
---
PCI PM: Export pci_pme_active to drivers
Export pci_pme_active() to drivers, so that they can clear the
PME_status bit and disable PME# for the device without involving
ACPI.
Modify the e100 driver to use pci_pme_active() for this purpose.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/net/e100.c | 4 +---
drivers/pci/pci.c | 3 ++-
include/linux/pci.h | 1 +
3 files changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -1060,7 +1060,7 @@ bool pci_pme_capable(struct pci_dev *dev
* The caller must verify that the device is capable of generating PME# before
* calling this function with @enable equal to 'true'.
*/
-static void pci_pme_active(struct pci_dev *dev, bool enable)
+void pci_pme_active(struct pci_dev *dev, bool enable)
{
u16 pmcsr;
@@ -1945,6 +1945,7 @@ EXPORT_SYMBOL(pci_set_power_state);
EXPORT_SYMBOL(pci_save_state);
EXPORT_SYMBOL(pci_restore_state);
EXPORT_SYMBOL(pci_pme_capable);
+EXPORT_SYMBOL(pci_pme_active);
EXPORT_SYMBOL(pci_enable_wake);
EXPORT_SYMBOL(pci_target_state);
EXPORT_SYMBOL(pci_prepare_to_sleep);
Index: linux-2.6/include/linux/pci.h
===================================================================
--- linux-2.6.orig/include/linux/pci.h
+++ linux-2.6/include/linux/pci.h
@@ -648,6 +648,7 @@ int pci_restore_state(struct pci_dev *de
int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
+void pci_pme_active(struct pci_dev *dev, bool enable);
int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
pci_power_t pci_target_state(struct pci_dev *dev);
int pci_prepare_to_sleep(struct pci_dev *dev);
Index: linux-2.6/drivers/net/e100.c
===================================================================
--- linux-2.6.orig/drivers/net/e100.c
+++ linux-2.6/drivers/net/e100.c
@@ -2738,9 +2738,7 @@ static int __devinit e100_probe(struct p
nic->flags |= wol_magic;
/* ack any pending wake events, disable PME */
- err = pci_enable_wake(pdev, 0, 0);
- if (err)
- DPRINTK(PROBE, ERR, "Error clearing wake event\n");
+ pci_pme_active(pdev, false);
strcpy(netdev->name, "eth%d");
if((err = register_netdev(netdev))) {
next prev parent reply other threads:[~2008-08-05 20:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 15:30 "e100_probe: Error clearing wake event" when booting 2.6.27-rc1 Alessandro Guido
2008-08-05 20:03 ` Rafael J. Wysocki [this message]
2008-08-07 16:47 ` Jesse Barnes
2008-08-07 22:00 ` Rafael J. Wysocki
2008-08-07 22:14 ` [PATCH] PCI PM: Export pci_pme_active to drivers Rafael J. Wysocki
2008-08-07 22:18 ` [PATCH] e100: Use pci_pme_active to clear PME_Status and disable PME# Rafael J. Wysocki
2008-09-13 20:15 ` Jeff Garzik
2008-09-14 23:44 ` Rafael J. Wysocki
2008-08-07 22:34 ` [PATCH] PCI PM: Export pci_pme_active to drivers Jesse Barnes
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=200808052203.07815.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=alessandro.guido@gmail.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).