lkml.org 
[lkml]   [2004]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] report which device failed to suspend
On Thu, May 27, 2004 at 06:36:16PM -0400, Nickolai Zeldovich wrote:
> When your machine stops suspending all of a sudden, a patch such as the
> one below is helpful to diagnose which device or driver is misbehaving and
> causing the suspend sequence to fail.
>
> -- kolya
>
> --- drivers/base/power/suspend.c 2004/05/27 22:09:47 1.1
> +++ drivers/base/power/suspend.c 2004/05/27 22:28:36
> @@ -42,6 +42,10 @@
> if (dev->bus && dev->bus->suspend && !dev->power.power_state)
> error = dev->bus->suspend(dev,state);
>
> + if (error)
> + printk(KERN_ERR "Could not suspend device %s: error %d\n",
> + kobject_name(&dev->kobj), error);
> +

As pointed out when Andrew forwarded this to me, this is the incorrect
way to do this, as -EAGAIN is valid to return from suspend().

I've put this check in the proper place in my trees.

thanks,

greg k-h
-
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:03    [W:0.033 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site