* Re: [Regression] USB wakeup problem on Toshiba Portege R500
[not found] <Pine.LNX.4.44L0.0901091055050.10951-100000@netrider.rowland.org>
@ 2009-01-09 17:53 ` Rafael J. Wysocki
2009-01-09 22:23 ` Pavel Machek
2009-01-12 21:53 ` Alan Stern
0 siblings, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-01-09 17:53 UTC (permalink / raw)
To: Alan Stern
Cc: Frans Pop, oliver, gregkh, akpm, linux-kernel, linux-pm, pavel,
torvalds, ACPI Devel Maling List, Len Brown
[CCing ACPI and Len)
On Friday 09 January 2009, Alan Stern wrote:
> On Thu, 8 Jan 2009, Frans Pop wrote:
>
> > Rafael J. Wysocki wrote:
> > > On Thursday 08 January 2009, Oliver Neukum wrote:
> > >> Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
> > >> You are making a very persuasive argument for reverting it.
> > >> But what about laptops that only have a USB keyboard?
> > >
> > > Well, up to and including 2.6.28 they needed to echo 'enable' to the USB
> > > controllers' /sys/devices/.../power/wakeup files, so if the patch is
> > > reverted, they won't be worse off than they were day before
> > > yesterday. :-)
> > >
> > > Perhaps we can choose the default depending on whether or not any HID
> > > devices are attached to given controller?
> >
> > Is "resume on keyboard activity" really all that needed? Both my laptops
> > and my desktop resume fine after pressing the power button.
> >
> > Also consider the following cases:
> > - laptop has been suspended with external USB mouse connected
> > - mouse is moved (accidentally or because it is in the way of a coffee
> > cup)
> > - mouse cable is removed before putting the laptop in a bag for
> > transport
> > - laptop is in docking station with USB mouse/kbd connected to that
> > - again, mouse gets moved for some reason
> > - laptop is undocked while suspended
> > - or the reverse: laptop gets docked
> >
> > IMO it is not desirable that the system gets resumed as a result of any of
> > those actions. I'm not complete sure that it would in all those cases,
> > but have they been considered?
> >
> > And in general I've always been in favor of things only happening
> > automagically if I've explicitly asked for that, and not by default.
>
> I don't mind reverting the "automatically enable PCI wakeup" commit. But
> we should first come to a definite policy for kernel default wakeup
> settings, rather than deciding things piecemeal for different subsystems.
>
> My proposal:
>
> Devices and events that are clearly associated with system
> wakeup should be enabled by default. For example: Power
> button and laptop lid.
Agreed.
> All other devices capable of waking up the system should be
> disabled by default. This presumably includes every PCI
> device. If users want keyboard or mouse events to cause
> a system resume then they will have to configure their
> desktop management program to enable it.
I generally agree, with one exception. There are network adapters which
can be enabled to wake up by the BIOS and their drivers set them up for WoL
currently on this basis. These should remain enabled IMO.
> Devices not capable of directly waking the system can be
> enabled. This includes things like USB devices, which
> have to pass a wakeup request through their parent and
> therefore can't wake up the system unless the parent is
> also enabled for wakeup.
Agreed.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Regression] USB wakeup problem on Toshiba Portege R500
2009-01-09 17:53 ` [Regression] USB wakeup problem on Toshiba Portege R500 Rafael J. Wysocki
@ 2009-01-09 22:23 ` Pavel Machek
2009-01-12 21:53 ` Alan Stern
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2009-01-09 22:23 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Alan Stern, Frans Pop, oliver, gregkh, akpm, linux-kernel,
linux-pm, torvalds, ACPI Devel Maling List, Len Brown
On Fri 2009-01-09 18:53:41, Rafael J. Wysocki wrote:
> [CCing ACPI and Len)
>
> On Friday 09 January 2009, Alan Stern wrote:
> > On Thu, 8 Jan 2009, Frans Pop wrote:
> >
> > > Rafael J. Wysocki wrote:
> > > > On Thursday 08 January 2009, Oliver Neukum wrote:
> > > >> Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
> > > >> You are making a very persuasive argument for reverting it.
> > > >> But what about laptops that only have a USB keyboard?
> > > >
> > > > Well, up to and including 2.6.28 they needed to echo 'enable' to the USB
> > > > controllers' /sys/devices/.../power/wakeup files, so if the patch is
> > > > reverted, they won't be worse off than they were day before
> > > > yesterday. :-)
> > > >
> > > > Perhaps we can choose the default depending on whether or not any HID
> > > > devices are attached to given controller?
> > >
> > > Is "resume on keyboard activity" really all that needed? Both my laptops
> > > and my desktop resume fine after pressing the power button.
> > >
> > > Also consider the following cases:
> > > - laptop has been suspended with external USB mouse connected
> > > - mouse is moved (accidentally or because it is in the way of a coffee
> > > cup)
> > > - mouse cable is removed before putting the laptop in a bag for
> > > transport
> > > - laptop is in docking station with USB mouse/kbd connected to that
> > > - again, mouse gets moved for some reason
> > > - laptop is undocked while suspended
> > > - or the reverse: laptop gets docked
> > >
> > > IMO it is not desirable that the system gets resumed as a result of any of
> > > those actions. I'm not complete sure that it would in all those cases,
> > > but have they been considered?
> > >
> > > And in general I've always been in favor of things only happening
> > > automagically if I've explicitly asked for that, and not by default.
> >
> > I don't mind reverting the "automatically enable PCI wakeup" commit. But
> > we should first come to a definite policy for kernel default wakeup
> > settings, rather than deciding things piecemeal for different subsystems.
> >
> > My proposal:
> >
> > Devices and events that are clearly associated with system
> > wakeup should be enabled by default. For example: Power
> > button and laptop lid.
>
> Agreed.
>
> > All other devices capable of waking up the system should be
> > disabled by default. This presumably includes every PCI
> > device. If users want keyboard or mouse events to cause
> > a system resume then they will have to configure their
> > desktop management program to enable it.
>
> I generally agree, with one exception. There are network adapters which
> can be enabled to wake up by the BIOS and their drivers set them up for WoL
> currently on this basis. These should remain enabled IMO.
Agreed. WoL worked before and it should remain working.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Regression] USB wakeup problem on Toshiba Portege R500
2009-01-09 17:53 ` [Regression] USB wakeup problem on Toshiba Portege R500 Rafael J. Wysocki
2009-01-09 22:23 ` Pavel Machek
@ 2009-01-12 21:53 ` Alan Stern
2009-01-12 22:53 ` Rafael J. Wysocki
1 sibling, 1 reply; 6+ messages in thread
From: Alan Stern @ 2009-01-12 21:53 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Frans Pop, oliver, gregkh, akpm, linux-kernel, linux-pm, pavel,
torvalds, ACPI Devel Maling List, Len Brown
On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> > My proposal:
> >
> > Devices and events that are clearly associated with system
> > wakeup should be enabled by default. For example: Power
> > button and laptop lid.
>
> Agreed.
>
> > All other devices capable of waking up the system should be
> > disabled by default. This presumably includes every PCI
> > device. If users want keyboard or mouse events to cause
> > a system resume then they will have to configure their
> > desktop management program to enable it.
>
> I generally agree, with one exception. There are network adapters which
> can be enabled to wake up by the BIOS and their drivers set them up for WoL
> currently on this basis. These should remain enabled IMO.
How do we know which adapters these are? IMO the PCI core should
disable wakeup by default for all devices when they are detected.
Is it sufficient to have the adapter drivers enable wakeup during
their probe routines?
> > Devices not capable of directly waking the system can be
> > enabled. This includes things like USB devices, which
> > have to pass a wakeup request through their parent and
> > therefore can't wake up the system unless the parent is
> > also enabled for wakeup.
>
> Agreed.
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Regression] USB wakeup problem on Toshiba Portege R500
2009-01-12 21:53 ` Alan Stern
@ 2009-01-12 22:53 ` Rafael J. Wysocki
2009-01-13 3:10 ` Alan Stern
0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-01-12 22:53 UTC (permalink / raw)
To: Alan Stern
Cc: Frans Pop, oliver, gregkh, akpm, linux-kernel, linux-pm, pavel,
torvalds, ACPI Devel Maling List, Len Brown
On Monday 12 January 2009, Alan Stern wrote:
> On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
>
> > > My proposal:
> > >
> > > Devices and events that are clearly associated with system
> > > wakeup should be enabled by default. For example: Power
> > > button and laptop lid.
> >
> > Agreed.
> >
> > > All other devices capable of waking up the system should be
> > > disabled by default. This presumably includes every PCI
> > > device. If users want keyboard or mouse events to cause
> > > a system resume then they will have to configure their
> > > desktop management program to enable it.
> >
> > I generally agree, with one exception. There are network adapters which
> > can be enabled to wake up by the BIOS and their drivers set them up for WoL
> > currently on this basis. These should remain enabled IMO.
>
> How do we know which adapters these are? IMO the PCI core should
> disable wakeup by default for all devices when they are detected.
This is what we do.
> Is it sufficient to have the adapter drivers enable wakeup during
> their probe routines?
Yes, it is.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Regression] USB wakeup problem on Toshiba Portege R500
2009-01-12 22:53 ` Rafael J. Wysocki
@ 2009-01-13 3:10 ` Alan Stern
2009-01-13 11:13 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2009-01-13 3:10 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Frans Pop, oliver, gregkh, akpm, linux-kernel, linux-pm, pavel,
torvalds, ACPI Devel Maling List, Len Brown
On Mon, 12 Jan 2009, Rafael J. Wysocki wrote:
> On Monday 12 January 2009, Alan Stern wrote:
> > On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> >
> > > > My proposal:
> > > >
> > > > Devices and events that are clearly associated with system
> > > > wakeup should be enabled by default. For example: Power
> > > > button and laptop lid.
> > >
> > > Agreed.
> > >
> > > > All other devices capable of waking up the system should be
> > > > disabled by default. This presumably includes every PCI
> > > > device. If users want keyboard or mouse events to cause
> > > > a system resume then they will have to configure their
> > > > desktop management program to enable it.
> > >
> > > I generally agree, with one exception. There are network adapters which
> > > can be enabled to wake up by the BIOS and their drivers set them up for WoL
> > > currently on this basis. These should remain enabled IMO.
> >
> > How do we know which adapters these are? IMO the PCI core should
> > disable wakeup by default for all devices when they are detected.
>
> This is what we do.
>
> > Is it sufficient to have the adapter drivers enable wakeup during
> > their probe routines?
>
> Yes, it is.
Therefore all we need is a patch to change the USB host controller
drivers. They should call device_set_wakeup_capable() instead of
device_init_wakeup().
I just got back from vacation so things will be busy for a few days,
but I'll send out such a patch soon.
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Regression] USB wakeup problem on Toshiba Portege R500
2009-01-13 3:10 ` Alan Stern
@ 2009-01-13 11:13 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-01-13 11:13 UTC (permalink / raw)
To: Alan Stern
Cc: Frans Pop, oliver, gregkh, akpm, linux-kernel, linux-pm, pavel,
torvalds, ACPI Devel Maling List, Len Brown
On Tuesday 13 January 2009, Alan Stern wrote:
> On Mon, 12 Jan 2009, Rafael J. Wysocki wrote:
>
> > On Monday 12 January 2009, Alan Stern wrote:
> > > On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> > >
> > > > > My proposal:
> > > > >
> > > > > Devices and events that are clearly associated with system
> > > > > wakeup should be enabled by default. For example: Power
> > > > > button and laptop lid.
> > > >
> > > > Agreed.
> > > >
> > > > > All other devices capable of waking up the system should be
> > > > > disabled by default. This presumably includes every PCI
> > > > > device. If users want keyboard or mouse events to cause
> > > > > a system resume then they will have to configure their
> > > > > desktop management program to enable it.
> > > >
> > > > I generally agree, with one exception. There are network adapters which
> > > > can be enabled to wake up by the BIOS and their drivers set them up for WoL
> > > > currently on this basis. These should remain enabled IMO.
> > >
> > > How do we know which adapters these are? IMO the PCI core should
> > > disable wakeup by default for all devices when they are detected.
> >
> > This is what we do.
> >
> > > Is it sufficient to have the adapter drivers enable wakeup during
> > > their probe routines?
> >
> > Yes, it is.
>
> Therefore all we need is a patch to change the USB host controller
> drivers. They should call device_set_wakeup_capable() instead of
> device_init_wakeup().
>
> I just got back from vacation so things will be busy for a few days,
> but I'll send out such a patch soon.
Great, thanks a lot!
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-13 11:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.44L0.0901091055050.10951-100000@netrider.rowland.org>
2009-01-09 17:53 ` [Regression] USB wakeup problem on Toshiba Portege R500 Rafael J. Wysocki
2009-01-09 22:23 ` Pavel Machek
2009-01-12 21:53 ` Alan Stern
2009-01-12 22:53 ` Rafael J. Wysocki
2009-01-13 3:10 ` Alan Stern
2009-01-13 11:13 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox