Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-24 Thread Rafael J. Wysocki
On Sunday, June 22, 2014 12:45:42 PM Alan Stern wrote: > On Sun, 22 Jun 2014, Rafael J. Wysocki wrote: > > > > How would you treat them specially? Add a "runtime_pm_not_supported" > > > flag? > > > > I thought about a "runtime PM has been enabled at least once" flag rather > > that would be

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-24 Thread Rafael J. Wysocki
On Sunday, June 22, 2014 12:45:42 PM Alan Stern wrote: On Sun, 22 Jun 2014, Rafael J. Wysocki wrote: How would you treat them specially? Add a runtime_pm_not_supported flag? I thought about a runtime PM has been enabled at least once flag rather that would be set by

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-23 Thread Kevin Hilman
Alan Stern writes: [...] > What we really need to figure out is how to tell the PM core which > devices may safely have their runtime callbacks invoked during system > suspend. For those devices, the core can avoid calling > pm_runtime_disable() during the suspend_late phase. That would

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-23 Thread Kevin Hilman
Alan Stern st...@rowland.harvard.edu writes: [...] What we really need to figure out is how to tell the PM core which devices may safely have their runtime callbacks invoked during system suspend. For those devices, the core can avoid calling pm_runtime_disable() during the suspend_late

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Alan Stern
On Sun, 22 Jun 2014, Rafael J. Wysocki wrote: > > How would you treat them specially? Add a "runtime_pm_not_supported" > > flag? > > I thought about a "runtime PM has been enabled at least once" flag rather > that would be set by pm_runtime_enable() every time it is called and never > cleared.

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 02:34:14 PM Kevin Hilman wrote: > Alan Stern writes: > > > On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > > > >> > For a general device, the fact that dev->power.is_suspended is set > >> > means the device _has_ been powered down. Even though the > >> > runtime_status

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Saturday, June 21, 2014 09:34:28 AM Alan Stern wrote: > On Fri, 20 Jun 2014, Kevin Hilman wrote: > > > > For a general device, the fact that dev->power.is_suspended is set > > > means the device _has_ been powered down. Even though the > > > runtime_status may not have changed, the PM core

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 10:48:09 AM Alan Stern wrote: > On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > > > > For a general device, the fact that dev->power.is_suspended is set > > > means the device _has_ been powered down. Even though the > > > runtime_status may not have changed, the PM core

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 10:43:11 AM Alan Stern wrote: > On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > > > On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: > > > On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: > > > > > > > Well, we used to have the notion that runtime_status is not

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 10:43:11 AM Alan Stern wrote: On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: Well, we used to have the notion that runtime_status is not meaningful

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 10:48:09 AM Alan Stern wrote: On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the runtime_status may not have changed, the PM core has to

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Saturday, June 21, 2014 09:34:28 AM Alan Stern wrote: On Fri, 20 Jun 2014, Kevin Hilman wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the runtime_status may not have changed, the PM core has to assume

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Rafael J. Wysocki
On Friday, June 20, 2014 02:34:14 PM Kevin Hilman wrote: Alan Stern st...@rowland.harvard.edu writes: On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-22 Thread Alan Stern
On Sun, 22 Jun 2014, Rafael J. Wysocki wrote: How would you treat them specially? Add a runtime_pm_not_supported flag? I thought about a runtime PM has been enabled at least once flag rather that would be set by pm_runtime_enable() every time it is called and never cleared. That would

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-21 Thread Alan Stern
On Fri, 20 Jun 2014, Kevin Hilman wrote: > > For a general device, the fact that dev->power.is_suspended is set > > means the device _has_ been powered down. Even though the > > runtime_status may not have changed, the PM core has to assume the > > device is not available for use. > > This is

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-21 Thread Alan Stern
On Fri, 20 Jun 2014, Kevin Hilman wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the runtime_status may not have changed, the PM core has to assume the device is not available for use. This is where things

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Kevin Hilman
Alan Stern writes: > On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > >> > For a general device, the fact that dev->power.is_suspended is set >> > means the device _has_ been powered down. Even though the >> > runtime_status may not have changed, the PM core has to assume the >> > device is not

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Kevin Hilman
Alan Stern writes: > On Thu, 19 Jun 2014, Kevin Hilman wrote: > >> Alan Stern writes: >> >> > On Thu, 19 Jun 2014, Allen Yu wrote: >> > >> >> So what's the exact state of device if dev->power.is_suspended flag >> >> is set and runtime_status is RPM_ACTIVE? Is it a state like >> >> "suspended

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Alan Stern
On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > > For a general device, the fact that dev->power.is_suspended is set > > means the device _has_ been powered down. Even though the > > runtime_status may not have changed, the PM core has to assume the > > device is not available for use. > > This

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Alan Stern
On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: > On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: > > On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: > > > > > Well, we used to have the notion that runtime_status is not meaningful for > > > devices with dev->power.disable_depth greater than

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 10:34:51 PM Allen Yu wrote: > On Thursday, June 19, 2014, Rafael J. Wysocki wrote: > > On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: > > > On Thursday, June 19, 2014, Rafael J. Wysocki wrote: [cut] > > > > Well, we used to have the notion that runtime_status

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: > On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: > > > Well, we used to have the notion that runtime_status is not meaningful for > > devices with dev->power.disable_depth greater than 0 (except for the special > > case in the suspend code

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 04:13:07 PM Alan Stern wrote: > On Thu, 19 Jun 2014, Kevin Hilman wrote: > > > Alan Stern writes: > > > > > On Thu, 19 Jun 2014, Allen Yu wrote: > > > > > >> So what's the exact state of device if dev->power.is_suspended flag > > >> is set and runtime_status is

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 04:13:07 PM Alan Stern wrote: On Thu, 19 Jun 2014, Kevin Hilman wrote: Alan Stern st...@rowland.harvard.edu writes: On Thu, 19 Jun 2014, Allen Yu wrote: So what's the exact state of device if dev-power.is_suspended flag is set and runtime_status is

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: Well, we used to have the notion that runtime_status is not meaningful for devices with dev-power.disable_depth greater than 0 (except for the special case in the suspend code path where

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 10:34:51 PM Allen Yu wrote: On Thursday, June 19, 2014, Rafael J. Wysocki wrote: On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: On Thursday, June 19, 2014, Rafael J. Wysocki wrote: [cut] Well, we used to have the notion that runtime_status is not

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Alan Stern
On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: On Thursday, June 19, 2014 10:34:01 AM Alan Stern wrote: On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: Well, we used to have the notion that runtime_status is not meaningful for devices with dev-power.disable_depth greater than 0 (except

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Alan Stern
On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the runtime_status may not have changed, the PM core has to assume the device is not available for use. This seems to

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Kevin Hilman
Alan Stern st...@rowland.harvard.edu writes: On Thu, 19 Jun 2014, Kevin Hilman wrote: Alan Stern st...@rowland.harvard.edu writes: On Thu, 19 Jun 2014, Allen Yu wrote: So what's the exact state of device if dev-power.is_suspended flag is set and runtime_status is RPM_ACTIVE? Is it a

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-20 Thread Kevin Hilman
Alan Stern st...@rowland.harvard.edu writes: On Fri, 20 Jun 2014, Rafael J. Wysocki wrote: For a general device, the fact that dev-power.is_suspended is set means the device _has_ been powered down. Even though the runtime_status may not have changed, the PM core has to assume the

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Kevin Hilman wrote: > Alan Stern writes: > > > On Thu, 19 Jun 2014, Allen Yu wrote: > > > >> So what's the exact state of device if dev->power.is_suspended flag > >> is set and runtime_status is RPM_ACTIVE? Is it a state like > >> "suspended but still can be accessed"? > >>

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Kevin Hilman
Alan Stern writes: > On Thu, 19 Jun 2014, Allen Yu wrote: > >> So what's the exact state of device if dev->power.is_suspended flag >> is set and runtime_status is RPM_ACTIVE? Is it a state like >> "suspended but still can be accessed"? >> >> I'm just afraid the existing code would cause a

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Allen Yu wrote: > So what's the exact state of device if dev->power.is_suspended flag > is set and runtime_status is RPM_ACTIVE? Is it a state like > "suspended but still can be accessed"? > > I'm just afraid the existing code would cause a device hang if we > allow it to be

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Allen Yu
On Thursday, June 19, 2014, Rafael J. Wysocki wrote: > On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: > > On Thursday, June 19, 2014, Rafael J. Wysocki wrote: > > > On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: > > > > On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: > > > > > > >

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: > Well, we used to have the notion that runtime_status is not meaningful for > devices with dev->power.disable_depth greater than 0 (except for the special > case in the suspend code path where we know why it is greater than 0). I > think > it was

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: > On Thursday, June 19, 2014, Rafael J. Wysocki wrote: > > On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: > > > On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: > > > > > > > On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Allen Yu
On Thursday, June 19, 2014, Rafael J. Wysocki wrote: > On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: > > On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: > > > > > On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: > > > > On Tuesday, June 17, 2014 10:26:14 PM Rafael J.

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Allen Yu
On Thursday, June 19, 2014, Rafael J. Wysocki wrote: On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote:

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Rafael J. Wysocki
On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: On Thursday, June 19, 2014, Rafael J. Wysocki wrote: On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: On

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Rafael J. Wysocki wrote: Well, we used to have the notion that runtime_status is not meaningful for devices with dev-power.disable_depth greater than 0 (except for the special case in the suspend code path where we know why it is greater than 0). I think it was useful.

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Allen Yu
On Thursday, June 19, 2014, Rafael J. Wysocki wrote: On Thursday, June 19, 2014 04:23:29 PM Allen Yu wrote: On Thursday, June 19, 2014, Rafael J. Wysocki wrote: On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: On Tuesday,

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Allen Yu wrote: So what's the exact state of device if dev-power.is_suspended flag is set and runtime_status is RPM_ACTIVE? Is it a state like suspended but still can be accessed? I'm just afraid the existing code would cause a device hang if we allow it to be accessed

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Kevin Hilman
Alan Stern st...@rowland.harvard.edu writes: On Thu, 19 Jun 2014, Allen Yu wrote: So what's the exact state of device if dev-power.is_suspended flag is set and runtime_status is RPM_ACTIVE? Is it a state like suspended but still can be accessed? I'm just afraid the existing code would

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-19 Thread Alan Stern
On Thu, 19 Jun 2014, Kevin Hilman wrote: Alan Stern st...@rowland.harvard.edu writes: On Thu, 19 Jun 2014, Allen Yu wrote: So what's the exact state of device if dev-power.is_suspended flag is set and runtime_status is RPM_ACTIVE? Is it a state like suspended but still can be

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-18 Thread Rafael J. Wysocki
On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: > On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: > > > On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: > > > On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: > > > > On Tuesday, June 17, 2014 10:11:32 AM Alan

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-18 Thread Alan Stern
On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: > On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: > > On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: > > > On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: > > > > On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: > >

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-18 Thread Alan Stern
On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: On Mon, 16 Jun 2014, Rafael J. Wysocki wrote:

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-18 Thread Rafael J. Wysocki
On Wednesday, June 18, 2014 11:30:51 AM Alan Stern wrote: On Tue, 17 Jun 2014, Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote:

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: > On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: > > On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: > > > On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: > > > > > > > > For reasons having nothing to do with

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: > On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: > > On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: > > > > > > For reasons having nothing to do with Allen's suggested change, I > > > > wonder if we shouldn't replace this line

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: > On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: > > > > For reasons having nothing to do with Allen's suggested change, I > > > wonder if we shouldn't replace this line with something like: > > > > > > - else if (dev->power.disable_depth ==

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Alan Stern
On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: > > For reasons having nothing to do with Allen's suggested change, I > > wonder if we shouldn't replace this line with something like: > > > > - else if (dev->power.disable_depth == 1 && dev->power.is_suspended > > + else if (dev->power.disable

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Alan Stern
On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: For reasons having nothing to do with Allen's suggested change, I wonder if we shouldn't replace this line with something like: - else if (dev-power.disable_depth == 1 dev-power.is_suspended + else if (dev-power.disable 0

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: For reasons having nothing to do with Allen's suggested change, I wonder if we shouldn't replace this line with something like: - else if (dev-power.disable_depth == 1

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: For reasons having nothing to do with Allen's suggested change, I wonder if we shouldn't replace this line with

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-17 Thread Rafael J. Wysocki
On Tuesday, June 17, 2014 10:37:03 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:26:14 PM Rafael J. Wysocki wrote: On Tuesday, June 17, 2014 10:11:32 AM Alan Stern wrote: On Mon, 16 Jun 2014, Rafael J. Wysocki wrote: For reasons having nothing to do with Allen's suggested

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Rafael J. Wysocki
On Monday, June 16, 2014 01:40:05 PM Alan Stern wrote: > On Sat, 14 Jun 2014, Allen Yu wrote: > > > --- a/drivers/base/power/runtime.c > > +++ b/drivers/base/power/runtime.c > > @@ -608,7 +608,7 @@ static int rpm_resume(struct device *dev, int rpmflags) > > repeat: > > if

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Alan Stern
On Sat, 14 Jun 2014, Allen Yu wrote: > --- a/drivers/base/power/runtime.c > +++ b/drivers/base/power/runtime.c > @@ -608,7 +608,7 @@ static int rpm_resume(struct device *dev, int rpmflags) > repeat: > if (dev->power.runtime_error) > retval = -EINVAL; > - else if

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Alan Stern
On Mon, 16 Jun 2014, Allen Yu wrote: > On Sat, 14 Jun 2014, Alan Stern wrote: > > > > dev->power.is_suspended is set after core suspends device during system > > suspend. > > > This flag mostly means device is not operational (all I/O been > > > quiesced, no more data read or write acceptible,

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Alan Stern
On Mon, 16 Jun 2014, Allen Yu wrote: On Sat, 14 Jun 2014, Alan Stern wrote: dev-power.is_suspended is set after core suspends device during system suspend. This flag mostly means device is not operational (all I/O been quiesced, no more data read or write acceptible, etc.), hence

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Alan Stern
On Sat, 14 Jun 2014, Allen Yu wrote: --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -608,7 +608,7 @@ static int rpm_resume(struct device *dev, int rpmflags) repeat: if (dev-power.runtime_error) retval = -EINVAL; - else if

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-16 Thread Rafael J. Wysocki
On Monday, June 16, 2014 01:40:05 PM Alan Stern wrote: On Sat, 14 Jun 2014, Allen Yu wrote: --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -608,7 +608,7 @@ static int rpm_resume(struct device *dev, int rpmflags) repeat: if (dev-power.runtime_error)

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-15 Thread Allen Yu
On Sat, 14 Jun 2014, Alan Stern wrote: > > dev->power.is_suspended is set after core suspends device during system > suspend. > > This flag mostly means device is not operational (all I/O been > > quiesced, no more data read or write acceptible, etc.), hence it's > > dangerous to access hardware

RE: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-15 Thread Allen Yu
On Sat, 14 Jun 2014, Alan Stern wrote: dev-power.is_suspended is set after core suspends device during system suspend. This flag mostly means device is not operational (all I/O been quiesced, no more data read or write acceptible, etc.), hence it's dangerous to access hardware if device

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-14 Thread Alan Stern
On Sat, 14 Jun 2014, Allen Yu wrote: > dev->power.is_suspended is set after core suspends device during system > suspend. > This flag mostly means device is not operational (all I/O been quiesced, no > more > data read or write acceptible, etc.), hence it's dangerous to access hardware > if >

Re: [PATCH 1/1] PM / Runtime: let rpm_resume fail if rpm disabled and device suspended.

2014-06-14 Thread Alan Stern
On Sat, 14 Jun 2014, Allen Yu wrote: dev-power.is_suspended is set after core suspends device during system suspend. This flag mostly means device is not operational (all I/O been quiesced, no more data read or write acceptible, etc.), hence it's dangerous to access hardware if device