From: Pavel Machek <pavel@ucw.cz>
To: torvalds@transmeta.com, kernel list <linux-kernel@vger.kernel.org>
Subject: S3 and swsusp: fixing device_resume order
Date: Sun, 4 Aug 2002 20:54:58 +0200 [thread overview]
Message-ID: <20020804185457.GA15103@elf.ucw.cz> (raw)
Hi!
pci driver's resume must not be called during RESUME_POWER_ON because
interrupts are still off and i8259A is not initialized [OHCI kills
machine in such case, cardbus probably too. PCI drivers just assume
initialized interrupts.]
Second hunk fixes device_resume calls to be okay according to
documentation. Please apply,
Pavel
--- clean/drivers/pci/pci-driver.c Thu Jul 25 22:21:15 2002
+++ linux-swsusp/drivers/pci/pci-driver.c Sun Aug 4 18:23:27 2002
@@ -90,7 +90,11 @@
struct pci_dev * pci_dev = to_pci_dev(dev);
if (pci_dev->driver) {
- if (level == RESUME_POWER_ON && pci_dev->driver->resume)
+ /* We may not call PCI drivers resume at
+ RESUME_POWER_ON because interrupts are not yet
+ working at that point. Calling resume at
+ RESUME_RESTORE_STATE seems like solution. */
+ if (level == RESUME_RESTORE_STATE && pci_dev->driver->resume)
pci_dev->driver->resume(pci_dev);
}
return 0;
--- clean/kernel/suspend.c Sun Aug 4 20:19:49 2002
+++ linux-swsusp/kernel/suspend.c Sun Aug 4 20:25:50 2002
@@ -619,8 +619,8 @@
/* Make disk drivers accept operations, again */
static void drivers_unsuspend(void)
{
- device_resume(RESUME_ENABLE);
device_resume(RESUME_RESTORE_STATE);
+ device_resume(RESUME_ENABLE);
}
/* Called from process context */
@@ -647,8 +647,8 @@
static void drivers_resume(int flags)
{
if (flags & RESUME_PHASE1) {
- device_resume(RESUME_ENABLE);
device_resume(RESUME_RESTORE_STATE);
+ device_resume(RESUME_ENABLE);
}
if (flags & RESUME_PHASE2) {
if(pm_suspend_state) {
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
reply other threads:[~2002-08-04 18:52 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=20020804185457.GA15103@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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®