Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-10-01 Thread Grygorii Strashko
On 09/17/2015 06:59 PM, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko > wrote: >> Hi, >> >> On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: >>> On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: On Wed, 16 Sep 2015, Grygorii Strashko

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-10-01 Thread Grygorii Strashko
On 09/17/2015 06:59 PM, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko > wrote: >> Hi, >> >> On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: >>> On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: On Wed, 16 Sep

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Alan Stern
On Tue, 22 Sep 2015, Rafael J. Wysocki wrote: > On Monday, September 21, 2015 10:34:54 AM Alan Stern wrote: > > On Mon, 21 Sep 2015, Thierry Reding wrote: > > > > > > > Force-removing drivers that depend on a device that's being unbound > > > > > would be a possibility to solve the problem where

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Rafael J. Wysocki
Hi, On Mon, Sep 21, 2015 at 10:51 AM, Thierry Reding wrote: > On Sat, Sep 19, 2015 at 01:07:56AM +0200, Rafael J. Wysocki wrote: >> On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding >> wrote: > [...] >> > Of course there's still the matter of some types of devices physically >> > disappearing

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Rafael J. Wysocki
On Monday, September 21, 2015 10:34:54 AM Alan Stern wrote: > On Mon, 21 Sep 2015, Thierry Reding wrote: > > > > > Force-removing drivers that depend on a device that's being unbound > > > > would be a possibility to solve the problem where consumers depend on a > > > > device that could

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Thierry Reding wrote: > > > Force-removing drivers that depend on a device that's being unbound > > > would be a possibility to solve the problem where consumers depend on a > > > device that could physically go away. It might also be the right thing > > > to do in any case.

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Thierry Reding
On Sat, Sep 19, 2015 at 01:07:56AM +0200, Rafael J. Wysocki wrote: > On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding > wrote: [...] > > Of course there's still the matter of some types of devices physically > > disappearing (USB, PCI, ...). > > Right. In some cases removal is simply necessary

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Rafael J. Wysocki
On Monday, September 21, 2015 10:34:54 AM Alan Stern wrote: > On Mon, 21 Sep 2015, Thierry Reding wrote: > > > > > Force-removing drivers that depend on a device that's being unbound > > > > would be a possibility to solve the problem where consumers depend on a > > > > device that could

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Alan Stern
On Tue, 22 Sep 2015, Rafael J. Wysocki wrote: > On Monday, September 21, 2015 10:34:54 AM Alan Stern wrote: > > On Mon, 21 Sep 2015, Thierry Reding wrote: > > > > > > > Force-removing drivers that depend on a device that's being unbound > > > > > would be a possibility to solve the problem where

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Rafael J. Wysocki
Hi, On Mon, Sep 21, 2015 at 10:51 AM, Thierry Reding wrote: > On Sat, Sep 19, 2015 at 01:07:56AM +0200, Rafael J. Wysocki wrote: >> On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding >> wrote: > [...] >> > Of course there's still the matter of

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Alan Stern
On Mon, 21 Sep 2015, Thierry Reding wrote: > > > Force-removing drivers that depend on a device that's being unbound > > > would be a possibility to solve the problem where consumers depend on a > > > device that could physically go away. It might also be the right thing > > > to do in any case.

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-21 Thread Thierry Reding
On Sat, Sep 19, 2015 at 01:07:56AM +0200, Rafael J. Wysocki wrote: > On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding > wrote: [...] > > Of course there's still the matter of some types of devices physically > > disappearing (USB, PCI, ...). > > Right. In some cases

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-18 Thread Rafael J. Wysocki
Hi Thierry, On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding wrote: > On Thu, Sep 17, 2015 at 08:43:54PM +0200, Rafael J. Wysocki wrote: >> Hi Alan, >> >> On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern >> wrote: >> > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: >> > >> >> On Thu, Sep 17, 2015 at

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-18 Thread Thierry Reding
On Thu, Sep 17, 2015 at 08:43:54PM +0200, Rafael J. Wysocki wrote: > Hi Alan, > > On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern wrote: > > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > > > >> On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki > >> wrote: > >> > On Wednesday, September 16, 2015

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-18 Thread Rafael J. Wysocki
Hi Thierry, On Fri, Sep 18, 2015 at 5:55 PM, Thierry Reding wrote: > On Thu, Sep 17, 2015 at 08:43:54PM +0200, Rafael J. Wysocki wrote: >> Hi Alan, >> >> On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern >> wrote: >> > On Thu, 17 Sep 2015, Rafael

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-18 Thread Thierry Reding
On Thu, Sep 17, 2015 at 08:43:54PM +0200, Rafael J. Wysocki wrote: > Hi Alan, > > On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern wrote: > > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > > > >> On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki > >>

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
On Thu, Sep 17, 2015 at 11:06 PM, Alan Stern wrote: > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > >> Note: Problems also may happen if device A depends on device B and its >> driver to be present and functional and then the B's driver module is >> unloaded. The core doesn't prevent that from

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
On Fri, Sep 18, 2015 at 1:59 AM, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko > wrote: [cut] > > In any case, maybe call that from dpm_suspend_start() after > dpm_prepare() has run successfully? This is the point we need to > start to block probing

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi, On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko wrote: > Hi, > > On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: >> On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: >>> On Wed, 16 Sep 2015, Grygorii Strashko wrote: >>> I think, It should prohibited to probe devices

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > Note: Problems also may happen if device A depends on device B and its > driver to be present and functional and then the B's driver module is > unloaded. The core doesn't prevent that from happening AFAICS. It also doesn't prevent B's driver from

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 7:40 AM, Tomeu Vizoso > wrote: > > On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: > >> On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > >>> > >>> It would also help if your patch checked to

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi Alan, On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern wrote: > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > >> On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki >> wrote: >> > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> >> On Wed, 16 Sep 2015, Thierry Reding wrote: >>

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi, On Thu, Sep 17, 2015 at 7:40 AM, Tomeu Vizoso wrote: > On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: >> On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >>> >>> It would also help if your patch checked to see if the device has any >>> children, and avoided moving it

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki wrote: > > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > >> On Wed, 16 Sep 2015, Thierry Reding wrote: > > [cut] > > > > > And I'm wondering if and how that is related to

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Grygorii Strashko
Hi, On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: >> On Wed, 16 Sep 2015, Grygorii Strashko wrote: >> >>> I think, It should prohibited to probe devices during suspend/hibernation. >>> And solution introduced in this patch might

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Grygorii Strashko
Hi, On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: >> On Wed, 16 Sep 2015, Grygorii Strashko wrote: >> >>> I think, It should prohibited to probe devices during suspend/hibernation. >>> And solution introduced in this patch might

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi Alan, On Thu, Sep 17, 2015 at 7:02 PM, Alan Stern wrote: > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > >> On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki >> wrote: >> > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> >>

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi, On Thu, Sep 17, 2015 at 7:40 AM, Tomeu Vizoso wrote: > On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: >> On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >>> >>> It would also help if your patch checked to see if the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 7:40 AM, Tomeu Vizoso > wrote: > > On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: > >> On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > >>> >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > Note: Problems also may happen if device A depends on device B and its > driver to be present and functional and then the B's driver module is > unloaded. The core doesn't prevent that from happening AFAICS. It also doesn't prevent B's driver from

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Alan Stern
On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki wrote: > > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > >> On Wed, 16 Sep 2015, Thierry Reding wrote: > > [cut] > > > > > And I'm wondering if and how that

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
Hi, On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko wrote: > Hi, > > On 09/17/2015 03:07 AM, Rafael J. Wysocki wrote: >> On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: >>> On Wed, 16 Sep 2015, Grygorii Strashko wrote: >>> I think, It should

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
On Fri, Sep 18, 2015 at 1:59 AM, Rafael J. Wysocki wrote: > Hi, > > On Thu, Sep 17, 2015 at 5:48 PM, Grygorii Strashko > wrote: [cut] > > In any case, maybe call that from dpm_suspend_start() after > dpm_prepare() has run successfully? This is the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-17 Thread Rafael J. Wysocki
On Thu, Sep 17, 2015 at 11:06 PM, Alan Stern wrote: > On Thu, 17 Sep 2015, Rafael J. Wysocki wrote: > >> Note: Problems also may happen if device A depends on device B and its >> driver to be present and functional and then the B's driver module is >> unloaded. The

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Tomeu Vizoso
On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> >> It would also help if your patch checked to see if the device has any >> children, and avoided moving it to the end of the list if it does. In >> fact, that might be

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> On Wed, 16 Sep 2015, Thierry Reding wrote: [cut] > > And I'm wondering if and how that is related to runtime PM? It only > covers the system sleep transitions case, but

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 04:38:07 PM Grygorii Strashko wrote: > On 09/16/2015 04:18 AM, Rafael J. Wysocki wrote: > > On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: [cut] > > > > > Did that patch manipulate dpm_list? > > no. So whether or not there were any problems

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > On Wed, 16 Sep 2015, Thierry Reding wrote: > > > > > Perhaps moving to the end of the list needs to be a little smarter. That > > > > is it could check whether the device has been prepared for suspension or > > > > not and only move

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: > On Wed, 16 Sep 2015, Grygorii Strashko wrote: > > > I think, It should prohibited to probe devices during suspend/hibernation. > > And solution introduced in this patch might help to fix it - > > in general, we could do : > > - add

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Grygorii Strashko wrote: > I think, It should prohibited to probe devices during suspend/hibernation. > And solution introduced in this patch might help to fix it - > in general, we could do : > - add sync point on suspend enter: wait_for_device_probe() and > - prohibit

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Thierry Reding wrote: > > > Perhaps moving to the end of the list needs to be a little smarter. That > > > is it could check whether the device has been prepared for suspension or > > > not and only move when it hasn't? > > > > Maybe. But doesn't that mean it won't solve

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Rafael J. Wysocki wrote: > > The core prohibits new devices from being registered. It does not > > prohibit probes of existing devices, because they currently do not > > affect the dpm_list. > > Which may be a mistake, because it does affect callbacks executed during >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Grygorii Strashko wrote: > >> The core prohibits new devices from being registered. It does not > >> prohibit probes of existing devices, because they currently do not > >> affect the dpm_list. > > Seems I missed smth, but I can't find the place in Kernel that prohibits >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
Hi Thierry, Alan, Rafael, On 09/12/2015 01:28 AM, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: >> On Fri, 11 Sep 2015, Thierry Reding wrote: >> >>> On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: On Thursday, September 10, 2015

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
On 09/16/2015 04:28 AM, Rafael J. Wysocki wrote: > On Tuesday, September 15, 2015 03:18:19 PM Alan Stern wrote: >> On Tue, 15 Sep 2015, Thierry Reding wrote: >> There are a few things to watch out for. Since the dpm_list gets modified during system sleep transitions, we would have to

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
On 09/16/2015 04:18 AM, Rafael J. Wysocki wrote: On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Thierry Reding
On Tue, Sep 15, 2015 at 03:18:19PM -0400, Alan Stern wrote: > On Tue, 15 Sep 2015, Thierry Reding wrote: > > > > There are a few things to watch out for. Since the dpm_list gets > > > modified during system sleep transitions, we would have to make sure > > > that nothing gets probed during those

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Thierry Reding
On Tue, Sep 15, 2015 at 03:18:19PM -0400, Alan Stern wrote: > On Tue, 15 Sep 2015, Thierry Reding wrote: > > > > There are a few things to watch out for. Since the dpm_list gets > > > modified during system sleep transitions, we would have to make sure > > > that nothing gets probed during those

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
Hi Thierry, Alan, Rafael, On 09/12/2015 01:28 AM, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: >> On Fri, 11 Sep 2015, Thierry Reding wrote: >> >>> On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: On Thursday, September 10, 2015

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
On 09/16/2015 04:18 AM, Rafael J. Wysocki wrote: On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Grygorii Strashko
On 09/16/2015 04:28 AM, Rafael J. Wysocki wrote: > On Tuesday, September 15, 2015 03:18:19 PM Alan Stern wrote: >> On Tue, 15 Sep 2015, Thierry Reding wrote: >> There are a few things to watch out for. Since the dpm_list gets modified during system sleep transitions, we would have to

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Grygorii Strashko wrote: > >> The core prohibits new devices from being registered. It does not > >> prohibit probes of existing devices, because they currently do not > >> affect the dpm_list. > > Seems I missed smth, but I can't find the place in Kernel that prohibits >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Rafael J. Wysocki wrote: > > The core prohibits new devices from being registered. It does not > > prohibit probes of existing devices, because they currently do not > > affect the dpm_list. > > Which may be a mistake, because it does affect callbacks executed during >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Thierry Reding wrote: > > > Perhaps moving to the end of the list needs to be a little smarter. That > > > is it could check whether the device has been prepared for suspension or > > > not and only move when it hasn't? > > > > Maybe. But doesn't that mean it won't solve

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Alan Stern
On Wed, 16 Sep 2015, Grygorii Strashko wrote: > I think, It should prohibited to probe devices during suspend/hibernation. > And solution introduced in this patch might help to fix it - > in general, we could do : > - add sync point on suspend enter: wait_for_device_probe() and > - prohibit

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 03:27:55 PM Alan Stern wrote: > On Wed, 16 Sep 2015, Grygorii Strashko wrote: > > > I think, It should prohibited to probe devices during suspend/hibernation. > > And solution introduced in this patch might help to fix it - > > in general, we could do : > > - add

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: > On Wed, 16 Sep 2015, Thierry Reding wrote: > > > > > Perhaps moving to the end of the list needs to be a little smarter. That > > > > is it could check whether the device has been prepared for suspension or > > > > not and only move

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Wednesday, September 16, 2015 04:38:07 PM Grygorii Strashko wrote: > On 09/16/2015 04:18 AM, Rafael J. Wysocki wrote: > > On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: [cut] > > > > > Did that patch manipulate dpm_list? > > no. So whether or not there were any problems

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Tomeu Vizoso
On 17 September 2015 at 02:27, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> >> It would also help if your patch checked to see if the device has any >> children, and avoided moving it to the end of the list if it does. In >>

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-16 Thread Rafael J. Wysocki
On Thu, Sep 17, 2015 at 2:27 AM, Rafael J. Wysocki wrote: > On Wednesday, September 16, 2015 03:22:37 PM Alan Stern wrote: >> On Wed, 16 Sep 2015, Thierry Reding wrote: [cut] > > And I'm wondering if and how that is related to runtime PM? It only > covers the system sleep

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 03:18:19 PM Alan Stern wrote: > On Tue, 15 Sep 2015, Thierry Reding wrote: > > > > There are a few things to watch out for. Since the dpm_list gets > > > modified during system sleep transitions, we would have to make sure > > > that nothing gets probed during

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: > On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: > > On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > > On Thursday,

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 10:23:07 AM Alan Stern wrote: > On Tue, 15 Sep 2015, Rafael J. Wysocki wrote: > > > Hi Alan, > > Hi. > > > On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern > > wrote: > > > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > > > > > >> On Friday, September 11, 2015

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Alan Stern
On Tue, 15 Sep 2015, Thierry Reding wrote: > > There are a few things to watch out for. Since the dpm_list gets > > modified during system sleep transitions, we would have to make sure > > that nothing gets probed during those times. In principle, that's what > > the "prepare" stage is meant

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Thierry Reding
On Fri, Sep 11, 2015 at 03:01:14PM -0400, Alan Stern wrote: > On Fri, 11 Sep 2015, Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry Reding > > > > > > > >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Thierry Reding
On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Alan Stern
On Tue, 15 Sep 2015, Rafael J. Wysocki wrote: > Hi Alan, Hi. > On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern wrote: > > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > > > >> On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > > > >> > There's also an issue about other types of

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 10:23:07 AM Alan Stern wrote: > On Tue, 15 Sep 2015, Rafael J. Wysocki wrote: > > > Hi Alan, > > Hi. > > > On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern > > wrote: > > > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > > > > > >> On

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 05:53:02 PM Thierry Reding wrote: > On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: > > On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > > On Thursday,

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Rafael J. Wysocki
On Tuesday, September 15, 2015 03:18:19 PM Alan Stern wrote: > On Tue, 15 Sep 2015, Thierry Reding wrote: > > > > There are a few things to watch out for. Since the dpm_list gets > > > modified during system sleep transitions, we would have to make sure > > > that nothing gets probed during

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Alan Stern
On Tue, 15 Sep 2015, Thierry Reding wrote: > > There are a few things to watch out for. Since the dpm_list gets > > modified during system sleep transitions, we would have to make sure > > that nothing gets probed during those times. In principle, that's what > > the "prepare" stage is meant

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Thierry Reding
On Fri, Sep 11, 2015 at 03:01:14PM -0400, Alan Stern wrote: > On Fri, 11 Sep 2015, Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry Reding

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Thierry Reding
On Sat, Sep 12, 2015 at 12:38:19AM +0200, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-15 Thread Alan Stern
On Tue, 15 Sep 2015, Rafael J. Wysocki wrote: > Hi Alan, Hi. > On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern wrote: > > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > > > >> On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > > > >> > There's also an issue

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-14 Thread Rafael J. Wysocki
Hi Alan, On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern wrote: > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > >> On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > >> > There's also an issue about other types of dependencies. For instance, >> > it's conceivable that device B might be

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-14 Thread Rafael J. Wysocki
Hi Alan, On Sat, Sep 12, 2015 at 7:40 PM, Alan Stern wrote: > On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > >> On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > >> > There's also an issue about other types of dependencies. For instance, >> > it's

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-12 Thread Alan Stern
On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > > There's also an issue about other types of dependencies. For instance, > > it's conceivable that device B might be discovered and depend on device > > A, even before A has been bound

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-12 Thread Alan Stern
On Sat, 12 Sep 2015, Rafael J. Wysocki wrote: > On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > > There's also an issue about other types of dependencies. For instance, > > it's conceivable that device B might be discovered and depend on device > > A, even before A has been bound

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Rafael J. Wysocki
On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > From: Thierry Reding > > >=20 > > > Deferred probe can lead to strange situations where

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Rafael J. Wysocki
On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > On Fri, 11 Sep 2015, Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry Reding > > > > > > > >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Alan Stern
On Fri, 11 Sep 2015, Thierry Reding wrote: > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Deferred probe can lead to strange situations where a device that is a > >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Alan Stern
On Fri, 11 Sep 2015, Rafael J. Wysocki wrote: > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > From: Thierry Reding > > > > Deferred probe can lead to strange situations where a device that is a > > dependency for others will be moved to the end of the dpm_list. At the >

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Thierry Reding
On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > From: Thierry Reding > > > > Deferred probe can lead to strange situations where a device that is a > > dependency for others will be moved to the end of the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Alan Stern
On Fri, 11 Sep 2015, Thierry Reding wrote: > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > From: Thierry Reding > > > > > > Deferred probe can lead to strange situations where a

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Rafael J. Wysocki
On Friday, September 11, 2015 02:03:46 PM Thierry Reding wrote: > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > From: Thierry Reding > > >=20 > > > Deferred probe can lead to

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Rafael J. Wysocki
On Friday, September 11, 2015 03:01:14 PM Alan Stern wrote: > On Fri, 11 Sep 2015, Thierry Reding wrote: > > > On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > > > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > > > From: Thierry Reding

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Alan Stern
On Fri, 11 Sep 2015, Rafael J. Wysocki wrote: > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > From: Thierry Reding > > > > Deferred probe can lead to strange situations where a device that is a > > dependency for others will be moved to the end of the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-11 Thread Thierry Reding
On Fri, Sep 11, 2015 at 12:08:02AM +0200, Rafael J. Wysocki wrote: > On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > > From: Thierry Reding > > > > Deferred probe can lead to strange situations where a device that is a > > dependency for others will be

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Rafael J. Wysocki
On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > From: Thierry Reding > > Deferred probe can lead to strange situations where a device that is a > dependency for others will be moved to the end of the dpm_list. At the > same time the dependers may not be moved because at the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Grygorii Strashko
On 09/10/2015 01:19 PM, Thierry Reding wrote: > From: Thierry Reding > > Deferred probe can lead to strange situations where a device that is a > dependency for others will be moved to the end of the dpm_list. At the > same time the dependers may not be moved because at the time they will > be

[PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Thierry Reding
From: Thierry Reding Deferred probe can lead to strange situations where a device that is a dependency for others will be moved to the end of the dpm_list. At the same time the dependers may not be moved because at the time they will be probed the dependee may already have been successfully

[PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Thierry Reding
From: Thierry Reding Deferred probe can lead to strange situations where a device that is a dependency for others will be moved to the end of the dpm_list. At the same time the dependers may not be moved because at the time they will be probed the dependee may already have

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Grygorii Strashko
On 09/10/2015 01:19 PM, Thierry Reding wrote: > From: Thierry Reding > > Deferred probe can lead to strange situations where a device that is a > dependency for others will be moved to the end of the dpm_list. At the > same time the dependers may not be moved because at the

Re: [PATCH] driver core: Ensure proper suspend/resume ordering

2015-09-10 Thread Rafael J. Wysocki
On Thursday, September 10, 2015 12:19:03 PM Thierry Reding wrote: > From: Thierry Reding > > Deferred probe can lead to strange situations where a device that is a > dependency for others will be moved to the end of the dpm_list. At the > same time the dependers may not be