From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux-pm mailing list <linux-pm@lists.osdl.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Don't "lose" devices on suspend on failure
Date: Tue, 31 May 2005 17:08:49 +1000 [thread overview]
Message-ID: <1117523329.5826.14.camel@gaston> (raw)
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
Hi !
I think we need this patch or we might "lose" devices to the dpm_irq_off
list if a failure occurs during the suspend process.
Patrick, Greg, your opinion ?
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/base/power/suspend.c
===================================================================
--- linux-work.orig/drivers/base/power/suspend.c 2005-05-31 16:29:22.000000000 +1000
+++ linux-work/drivers/base/power/suspend.c 2005-05-31 16:57:29.000000000 +1000
@@ -113,8 +113,19 @@
put_device(dev);
}
up(&dpm_list_sem);
- if (error)
+ if (error) {
+ /* we failed... before resuming, bring back devices from
+ * dpm_off_irq list back to main dpm_off list, we do want
+ * to call resume() on them, in case they partially suspended
+ * despite returning -EAGAIN
+ */
+ while (!list_empty(&dpm_off_irq)) {
+ struct list_head * entry = dpm_off_irq.next;
+ list_del(entry);
+ list_add(entry, &dpm_off);
+ }
dpm_resume();
+ }
up(&dpm_sem);
return error;
}
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux-pm mailing list <linux-pm@lists.osdl.org>
Cc: Patrick Mochel <mochel@digitalimplant.org>,
Greg KH <greg@kroah.com>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Don't "lose" devices on suspend on failure
Date: Tue, 31 May 2005 17:08:49 +1000 [thread overview]
Message-ID: <1117523329.5826.14.camel@gaston> (raw)
Hi !
I think we need this patch or we might "lose" devices to the dpm_irq_off
list if a failure occurs during the suspend process.
Patrick, Greg, your opinion ?
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Index: linux-work/drivers/base/power/suspend.c
===================================================================
--- linux-work.orig/drivers/base/power/suspend.c 2005-05-31 16:29:22.000000000 +1000
+++ linux-work/drivers/base/power/suspend.c 2005-05-31 16:57:29.000000000 +1000
@@ -113,8 +113,19 @@
put_device(dev);
}
up(&dpm_list_sem);
- if (error)
+ if (error) {
+ /* we failed... before resuming, bring back devices from
+ * dpm_off_irq list back to main dpm_off list, we do want
+ * to call resume() on them, in case they partially suspended
+ * despite returning -EAGAIN
+ */
+ while (!list_empty(&dpm_off_irq)) {
+ struct list_head * entry = dpm_off_irq.next;
+ list_del(entry);
+ list_add(entry, &dpm_off);
+ }
dpm_resume();
+ }
up(&dpm_sem);
return error;
}
next reply other threads:[~2005-05-31 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-31 7:08 Benjamin Herrenschmidt [this message]
2005-05-31 7:08 ` [PATCH] Don't "lose" devices on suspend on failure Benjamin Herrenschmidt
2005-06-01 21:24 ` Greg KH
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=1117523329.5826.14.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.