linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cx88xx: Fix lockup on suspend
@ 2007-01-05  2:12 Robert Hancock
  2007-01-05 17:32 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2007-01-05  2:12 UTC (permalink / raw)
  To: linux-kernel, mchehab, v4l-dvb-maintainer

Suspending with the cx88xx module loaded causes the system to lock up 
because the cx88_audio_thread kthread was missing a try_to_freeze() 
call, which caused it to go into a tight loop and result in softlockup 
when suspending. Fix that.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>

--- linux-2.6.20-rc3-git4-orig/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:51:45.000000000 -0600
+++ linux-2.6.20-rc3-git4/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:25:19.000000000 -0600
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
+#include <linux/freezer.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
@@ -961,6 +962,7 @@ int cx88_audio_thread(void *data)
 		msleep_interruptible(1000);
 		if (kthread_should_stop())
 			break;
+		try_to_freeze();
 
 		/* just monitor the audio status for now ... */
 		memset(&t, 0, sizeof(t));




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cx88xx: Fix lockup on suspend
  2007-01-05  2:12 [PATCH] cx88xx: Fix lockup on suspend Robert Hancock
@ 2007-01-05 17:32 ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2007-01-05 17:32 UTC (permalink / raw)
  To: Robert Hancock; +Cc: linux-kernel, mchehab, v4l-dvb-maintainer

Hi!

> Suspending with the cx88xx module loaded causes the 
> system to lock up because the cx88_audio_thread kthread 
> was missing a try_to_freeze() call, which caused it to 
> go into a tight loop and result in softlockup when 
> suspending. Fix that.
> 
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>
>

Ack,
 
> --- 
> linux-2.6.20-rc3-git4-orig/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:51:45.000000000 -0600
> +++ 
> linux-2.6.20-rc3-git4/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:25:19.000000000 -0600
> @@ -38,6 +38,7 @@
> #include <linux/module.h>
> #include <linux/moduleparam.h>
> #include <linux/errno.h>
> +#include <linux/freezer.h>
> #include <linux/kernel.h>
> #include <linux/slab.h>
> #include <linux/mm.h>

but your patch was whitespace-damaged. Can you retry?

> @@ -961,6 +962,7 @@ int cx88_audio_thread(void *data)
> 		msleep_interruptible(1000);
> 		if (kthread_should_stop())
> 			break;
> +		try_to_freeze();
> 

							Pavel

-- 
Thanks for all the (sleeping) penguins.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cx88xx: Fix lockup on suspend
  2007-01-06 18:25   ` Robert Hancock
@ 2007-01-06 20:52     ` Nigel Cunningham
  0 siblings, 0 replies; 4+ messages in thread
From: Nigel Cunningham @ 2007-01-06 20:52 UTC (permalink / raw)
  To: Robert Hancock; +Cc: Pavel Machek, linux-kernel

Hi.

On Sat, 2007-01-06 at 12:25 -0600, Robert Hancock wrote:
> Pavel Machek wrote:
> > Ack,
> >   
> > but your patch was whitespace-damaged. Can you retry?
> >   
> 
> Here's another try with it attached (Thunderbird is deciding to be a
> pain unfortunately..)
> 
> ---
> 
> Suspending with the cx88xx module loaded causes the system to lock up
> because the cx88_audio_thread kthread was missing a try_to_freeze()
> call, which caused it to go into a tight loop and result in softlockup
> when suspending. Fix that.
> 
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>

Signed-off-by: Nigel Cunningham <nigel@nigel.suspend2.net>


I have just gotten a cx88 card and had to do the same thing, but hadn't
had time to send the patch yet. The cards (or at least my one) need more
attention than this though; after resuming mine doesn't tune.

Regards,

Nigel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cx88xx: Fix lockup on suspend
       [not found] ` <fa.mPiA9bh9SZGXd2TrS/eQjWPc9oA@ifi.uio.no>
@ 2007-01-06 18:25   ` Robert Hancock
  2007-01-06 20:52     ` Nigel Cunningham
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2007-01-06 18:25 UTC (permalink / raw)
  To: Pavel Machek, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Pavel Machek wrote:
> Ack,
>   
> but your patch was whitespace-damaged. Can you retry?
>   

Here's another try with it attached (Thunderbird is deciding to be a
pain unfortunately..)

---

Suspending with the cx88xx module loaded causes the system to lock up
because the cx88_audio_thread kthread was missing a try_to_freeze()
call, which caused it to go into a tight loop and result in softlockup
when suspending. Fix that.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>


[-- Attachment #2: fix-cx88-suspend.patch --]
[-- Type: text/plain, Size: 644 bytes --]

--- linux-2.6.20-rc3-git4-orig/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:51:45.000000000 -0600
+++ linux-2.6.20-rc3-git4/drivers/media/video/cx88/cx88-tvaudio.c	2007-01-04 19:25:19.000000000 -0600
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
+#include <linux/freezer.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
@@ -961,6 +962,7 @@ int cx88_audio_thread(void *data)
 		msleep_interruptible(1000);
 		if (kthread_should_stop())
 			break;
+		try_to_freeze();
 
 		/* just monitor the audio status for now ... */
 		memset(&t, 0, sizeof(t));


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-06 20:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-05  2:12 [PATCH] cx88xx: Fix lockup on suspend Robert Hancock
2007-01-05 17:32 ` Pavel Machek
     [not found] <fa.zlXsUuWZNMJXOVESY6BoJRtki8Y@ifi.uio.no>
     [not found] ` <fa.mPiA9bh9SZGXd2TrS/eQjWPc9oA@ifi.uio.no>
2007-01-06 18:25   ` Robert Hancock
2007-01-06 20:52     ` Nigel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).