lkml.org 
[lkml]   [2004]   [Nov]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [linux-pm] [PATCH] make pm_suspend_disk suspend/resume sysdev and dpm_off_irq
DateThu, 25 Nov 2004 12:59:39 +0800
From"Zhu, Yi" <>
Pavel Machek wrote:
> Hi!
> 
>> This patch makes the new swsusp code ( pm_suspend_disk since
>> 2.6.9-rc3) call suspend/resume functions for sysdev and devices in
>> dpm_off_irq list. Otherwise, PCI link device in the system won't
>> provide correct interrupt for PCI devices during resume.
> 
> I do not think this is right approach; you enable interrupts
> then disable that again, potentially without interrupt controller
> being initialized. 
> 
> This should be better patch:

Agreed. Your patch solves the bug. But do you plan to deal with the 
devices in dpm_off_irq list?

Thanks,
-yi

> --- clean/kernel/power/swsusp.c	2004-10-19
> 14:16:29.000000000 +0200
> +++ linux/kernel/power/swsusp.c	2004-11-23
> 23:11:04.000000000 +0100
> @@ -854,11 +840,13 @@
>  	if ((error = arch_prepare_suspend()))
>  		return error;
>  	local_irq_disable();
> +	sysdev_suspend(3);
>  	save_processor_state();
>  	error = swsusp_arch_suspend();
>  	/* Restore control flow magically appears here */ 
>  	restore_processor_state(); restore_highmem();
> +	sysdev_resume();
>  	local_irq_enable();
>  	return error;
>  }
> @@ -878,6 +866,7 @@
>  {
>  	int error;
>  	local_irq_disable();
> +	sysdev_suspend(3);
>  	/* We'll ignore saved state, but this gets preempt
> count (etc) right */
>  	save_processor_state();
>  	error = swsusp_arch_resume();
> @@ -887,6 +876,7 @@
>  	BUG_ON(!error);
>  	restore_processor_state();
>  	restore_highmem();
> +	sysdev_resume();
>  	local_irq_enable();
>  	return error;
>  }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2008