From: Hu Gang <hugang@soulinfo.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: problem abort software suspend.
Date: Sun, 29 Sep 2002 10:15:53 +0800 [thread overview]
Message-ID: <20020929101553.5ed77a54.hugang@soulinfo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
Hi Pavel Machek:
I found result, That why my laptop without PM can do suspend/resume and with the PM can Not do suspend/resume.
The problem is in 3c59x modules.
I write an mini script do suspend and resume. When stop the net interface and remove the 3c59x all is fine. But not remove the 3c59x modules, in resume will panic.
After it, I do the follow test. Change the 3c59x code. Now suspend and resume, the kernel not panic, and all is fine. But I see the "recall resume" from dmesg command, So that is the problem.
Summarize: In resume progress have overlay device resume.
I thinks add the check code in low level driver is not good idea.
----------------------------------------------------patch code-----------
#ifdef CONFIG_PM
-
+static int in_suspend = 0;
static int vortex_suspend (struct pci_dev *pdev, u32 state)
{
struct net_device *dev = pci_get_drvdata(pdev);
+ if (in_suspend == 1) {
+ printk("recall suspend\n");
+ return 0;
+ }
+ printk("doing vortex suspend\n");
+ in_suspend = 1;
+
if (dev && dev->priv) {
if (netif_running(dev)) {
netif_device_detach(dev);
@@ -904,6 +911,13 @@
static int vortex_resume (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
+
+ if (in_suspend == 0) {
+ printk("recall resume\n");
+ return 0;
+ }
+ printk("doing vortex resume\n");
+ in_suspend = 0;
if (dev && dev->priv) {
if (netif_running(dev)) {
--
- Hu Gang
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2002-09-29 2:17 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=20020929101553.5ed77a54.hugang@soulinfo.com \
--to=hugang@soulinfo.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®