Skip to contentSkip to conversation

libata and pm

DISCUSSION Prakash K. Cheemplavam 2 participants 4 messages Nov 30, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

Hi,

I wonder whether libata can easily be made compatible with swsup or pmdisk.

Currently my tries stop with the message:

PM: Preparing system for suspend
Stopping tasks: =================================================exiting...========
stopping tasks failed (1 tasks remaining)
Restarting tasks...<6> Strange, katad-1 not stopped
done

I think that katad belongs to libata.

Cheers,

Prakash

#1 lore raw
Quoted 6 lines · Prakash K. Cheemplavam

Hi,

I wonder whether libata can easily be made compatible with swsup or pmdisk.

Currently my tries stop with the message:

Quoted 8 lines

PM: Preparing system for suspend
Stopping tasks: =================================================exiting...========
stopping tasks failed (1 tasks remaining)
Restarting tasks...<6> Strange, katad-1 not stopped
done

I think that katad belongs to libata.

I'm curious if this [completely untested] patch works? :)

Jeff

===== drivers/scsi/libata-core.c 1.7 vs edited =====

drivers/scsi/libata-core.c +3 -0
@@ -2567,6 +2567,9 @@
 
 		timeout = ata_thread_iter(ap);
 
+		if (current->flags & PF_FREEZE)
+			refrigerator(PF_IOTHREAD);
+
                 if (signal_pending (current))
                         flush_signals(current);
 
#2 lore raw
Quoted 15 lines · Jeff Garzik
Quoted 13 lines · Prakash K. Cheemplavam

Hi,

I wonder whether libata can easily be made compatible with swsup or pmdisk.

Currently my tries stop with the message:

PM: Preparing system for suspend
Stopping tasks: =================================================exiting...========
stopping tasks failed (1 tasks remaining)
Restarting tasks...<6> Strange, katad-1 not stopped
done

Quoted 4 lines
Quoted 1 line

I think that katad belongs to libata.

I'm curious if this [completely untested] patch works? :)

Well, it works as it should -I guess-,ie. swsusp proceeds, but (as expected) after all it doesn't work with scsi and swsusp gives a kernel panic. But that is another matter. ;-)

Nevertheless I got following wanrings on compile (second one was already there):

drivers/scsi/libata-core.c: In function `ata_thread':
drivers/scsi/libata-core.c:2571: Warnung: implicit declaration of function `refrigerator' drivers/scsi/libata-core.c: At top level:
drivers/scsi/libata-core.c:2141: Warnung: `ata_qc_push' defined but not used

(Furthermore the patch didn't want to apply, so I had to do it by hand.)

Thx,

Prakash

#3 lore raw
Quoted 26 lines · Prakash K. Cheemplavam
Quoted 15 lines · Jeff Garzik
Quoted 13 lines · Prakash K. Cheemplavam

Hi,

I wonder whether libata can easily be made compatible with swsup or pmdisk.

Currently my tries stop with the message:

PM: Preparing system for suspend
Stopping tasks: =================================================exiting...========
stopping tasks failed (1 tasks remaining)
Restarting tasks...<6> Strange, katad-1 not stopped
done

Quoted 5 lines
Quoted 1 line

I think that katad belongs to libata.

I'm curious if this [completely untested] patch works? :)

Well, it works as it should -I guess-,ie. swsusp proceeds, but (as expected) after all it doesn't work with scsi and swsusp gives a kernel panic. But that is another matter. ;-)

Quoted 8 lines

Nevertheless I got following wanrings on compile (second one was already there):

drivers/scsi/libata-core.c: In function `ata_thread':
drivers/scsi/libata-core.c:2571: Warnung: implicit declaration of function `refrigerator' drivers/scsi/libata-core.c: At top level:
drivers/scsi/libata-core.c:2141: Warnung: `ata_qc_push' defined but not used

(Furthermore the patch didn't want to apply, so I had to do it by hand.)

Duh, I'm silly... you need #include <linux/suspend.h> at the top of that file, too. I'm amazed swsusp proceeds at all :)

Jeff