Skip to contentSkip to conversation

snd-bt-sco.ko and ACPI suspend

Bluez-devel Stefan Scheler 3 participants 6 messages Mar 10, 2006 – Mar 11, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

currently snd-bt-sco.ko is breaking ACPI suspend. So can we please apply a minor patch like the following to CVS and fix this? Thanks.

Stefan

kernel/btsco.c +5 -0
diff -ru btsco/kernel/btsco.c btsco/kernel/btsco.c
@@ -891,6 +891,11 @@
 	up(&bt_sco->thread_sem);
 
 	do {
+
+#ifdef CONFIG_PM
+		try_to_freeze();
+#endif
+
 		if (signal_pending(current))
 			flush_signals(current);
 
#1 lore raw
Quoted 2 lines · Stefan Scheler

currently snd-bt-sco.ko is breaking ACPI suspend. So can we please apply a minor patch like the following to CVS and fix this? Thanks.

If it had been merged into Linus' kernel tree, that would have happened already long ago. Why hasn't it been merged?

Signature · 13 lines
dwmw2



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
#2 lore raw

David

Quoted 5 lines
Quoted 2 lines

currently snd-bt-sco.ko is breaking ACPI suspend. So can we please apply a minor patch like the following to CVS and fix this? Thanks.

If it had been merged into Linus' kernel tree, that would have happened already long ago. Why hasn't it been merged?

I patched cvs.

I believe it would take more work to get it to the stage that it would be acceptable for inclusion. Probably as much effort as just moving it entirely to userspace, where it (arguably) belongs.

Brad

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw
In reply to Stefan Scheler

Stefan

doh. If we had been included then we wouldn't have to worry about the older api for try_to_freeze. Can you give me a safer patch that will work with 2.6.12 for example?

brad

Quoted 7 lines

diff -ru btsco/kernel/btsco.c btsco/kernel/btsco.c

kernel/btsco.c +0 -0
@@ -891,6 +891,11 @@
 	up(&bt_sco->thread_sem);

kernel/btsco.c line 901

Quoted 10 lines
kernel/btsco.c +5 -0
 
 	do {
+
+#ifdef CONFIG_PM
+		try_to_freeze();
+#endif
+
 		if (signal_pending(current))
 			flush_signals(current);
 

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw
Quoted 1 line

Can you give me a safer patch that will work with 2.6.12 for example?

Well, yes. I also removed the unnecessary CONFIG_PM-define. try_to_freeze() is also available with power management disabled as I found out. The following patch has been tested with 2.6.11.4 and I didn't notice any ill effects.

Stefan

kernel/btsco.c +4 -1
diff -ru btsco.orig/kernel/btsco.c btsco/kernel/btsco.c
@@ -892,8 +892,11 @@
 
 	do {
 
-#ifdef CONFIG_PM
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
 		try_to_freeze();
+#else
+		if (current->flags & PF_FREEZE)
+			refrigerator(PF_FREEZE);
 #endif
 
 		if (signal_pending(current))
#5 lore raw

Stefan

Quoted 3 lines
Quoted 1 line

Can you give me a safer patch that will work with 2.6.12 for example?

Well, yes. I also removed the unnecessary CONFIG_PM-define.

thanks for the quick fix :) I've applied it.

Brad

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel