mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* IDE suspend small fixes
@ 2002-03-22 11:21 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2002-03-22 11:21 UTC (permalink / raw)
  To: Martin Dalecki, kernel list

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-22 11:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-22 11:21 IDE suspend small fixes Pavel Machek

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®