From: Pavel Machek <pavel@ucw.cz>
To: Martin Dalecki <dalecki@evision-ventures.com>,
kernel list <linux-kernel@vger.kernel.org>
Subject: IDE suspend small fixes
Date: Fri, 22 Mar 2002 12:21:21 +0100 [thread overview]
Message-ID: <20020322112120.GA6343@elf.ucw.cz> (raw)
Hi!
Its bad idea to try to restore state twice for one suspend, this fixes
it. Please apply,
Pavel
--- clean/drivers/ide/ide-disk.c Thu Mar 21 11:35:59 2002
+++ linux-acpi/drivers/ide/ide-disk.c Fri Mar 22 12:08:58 2002
@@ -123,7 +123,7 @@
while (drive->blocked) {
yield();
- // panic("ide: Request while drive blocked?");
+ printk("ide: Request while drive blocked?");
}
if (!(rq->flags & REQ_CMD)) {
@@ -915,6 +915,9 @@
* already been done...
*/
+ if (level != SUSPEND_SAVE_STATE)
+ return 0;
+
/* wait until all commands are finished */
printk("ide_disk_suspend()\n");
while (HWGROUP(drive)->handler)
@@ -934,6 +937,9 @@
static int idedisk_resume(struct device *dev, u32 level)
{
ide_drive_t *drive = dev->driver_data;
+
+ if (level != RESUME_RESTORE_STATE)
+ return 0;
if (!drive->blocked)
panic("ide: Resume but not suspended?\n");
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
reply other threads:[~2002-03-22 11:22 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=20020322112120.GA6343@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=dalecki@evision-ventures.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®