Re: Changes to sysfs PM layer break userspace

2006-12-23 Thread Stefan Seyfried
On Fri, Dec 22, 2006 at 08:44:01PM +, Pavel Machek wrote: > Hi! > > > > which userspace is using this btw? > > > > Ubuntu uses it to disable wireless hardware under certain circumstances. > > I believe that Suse's powernowd uses it to power down wired ethernet > > hardware when it's not in

Re: Changes to sysfs PM layer break userspace

2006-12-23 Thread Pavel Machek
Hi! > > which userspace is using this btw? > > Ubuntu uses it to disable wireless hardware under certain circumstances. > I believe that Suse's powernowd uses it to power down wired ethernet > hardware when it's not in use. I flamed seife for this. It was always broken for 20%-or-so of hardwar

Re: Changes to sysfs PM layer break userspace

2006-12-21 Thread Arjan van de Ven
> > > > > What we should do is to revert 047bda36150d11422b2c7bacca1df324c909c0b3 > > > and > > > > Bad answer > > Is better than breaking stuff. .. stuff that made assumptions about something and did stuff it probably shouldn't have been doing for the intent it had ;) the semantics of this

Re: Changes to sysfs PM layer break userspace

2006-12-20 Thread David Brownell
On Wednesday 20 December 2006 9:02 pm, Andrew Morton wrote: > > ... see my original reply in this thread. If "the answer" is > > to involve making PCI devices work again, better solutions include reverting > > the patch I mentioned (adding the suspend_late/resume_early support to PCI) > > or a ve

Re: Changes to sysfs PM layer break userspace

2006-12-20 Thread Andrew Morton
On Wed, 20 Dec 2006 20:56:27 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > On Wednesday 20 December 2006 7:51 pm, Andrew Morton wrote: > > > > + if (!warned) { > > > + printk(KERN_WARNING > > > + "*** WARNING *** sysfs devices/.../power/state files " > > > +

Re: Changes to sysfs PM layer break userspace

2006-12-20 Thread David Brownell
On Wednesday 20 December 2006 7:51 pm, Andrew Morton wrote: > > + if (!warned) { > > + printk(KERN_WARNING > > + "*** WARNING *** sysfs devices/.../power/state files " > > + "are only for testing, and will be removed\n"); > > + warned = err

Re: Changes to sysfs PM layer break userspace

2006-12-20 Thread Andrew Morton
On Tue, 19 Dec 2006 19:29:13 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > On Tuesday 19 December 2006 6:15 pm, Andrew Morton wrote: > > On Tue, 19 Dec 2006 13:34:49 -0800 > > David Brownell <[EMAIL PROTECTED]> wrote: > > > > > Documentation/feature-removal-schedule.txt has warned about this

Re: Changes to sysfs PM layer break userspace

2006-12-20 Thread Kyle Moffett
On Dec 19, 2006, at 15:55:43, Arjan van de Ven wrote: On Tue, 2006-12-19 at 20:32 +, Matthew Garrett wrote: On Tue, Dec 19, 2006 at 09:23:05PM +0100, Arjan van de Ven wrote: On Tue, 2006-12-19 at 20:08 +, Matthew Garrett wrote: I'm not sure. Suspending the chip means you lose things lik

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Andrew Morton
On Tue, 19 Dec 2006 18:35:39 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote: > On Tue, 19 Dec 2006 18:15:24 -0800 Andrew Morton wrote: > > > On Tue, 19 Dec 2006 13:34:49 -0800 > > David Brownell <[EMAIL PROTECTED]> wrote: > > > > > Documentation/feature-removal-schedule.txt has warned about this s

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread David Brownell
On Tuesday 19 December 2006 6:15 pm, Andrew Morton wrote: > On Tue, 19 Dec 2006 13:34:49 -0800 > David Brownell <[EMAIL PROTECTED]> wrote: > > > Documentation/feature-removal-schedule.txt has warned about this since > > August > > Nobody reads that. > > Please, wherever possible, put a nice prin

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Randy Dunlap
On Tue, 19 Dec 2006 18:15:24 -0800 Andrew Morton wrote: > On Tue, 19 Dec 2006 13:34:49 -0800 > David Brownell <[EMAIL PROTECTED]> wrote: > > > Documentation/feature-removal-schedule.txt has warned about this since > > August > > Nobody reads that. Ugh, I read it. > Please, wherever possible, p

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Andrew Morton
On Tue, 19 Dec 2006 13:34:49 -0800 David Brownell <[EMAIL PROTECTED]> wrote: > Documentation/feature-removal-schedule.txt has warned about this since > August Nobody reads that. Please, wherever possible, put a nice printk("this is going away") in the code when planning these things. - To unsubs

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
On Tue, Dec 19, 2006 at 01:34:49PM -0800, David Brownell wrote: > Documentation/feature-removal-schedule.txt has warned about this since > August, and the PM list has discussed how broken that model is numerous > times over the past several years. (I'm pretty sure that discussion has > leaked out

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
On Tue, Dec 19, 2006 at 01:22:12PM -0800, David Brownell wrote: > Stop trying to use broken and deprecated APIs; and realize that "previously > working" meant you just hadn't tripped over the serious bugs yet. I'm happy to stop using broken and deprecated APIs, providing that there's *actually a

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread David Brownell
On Tuesday 19 December 2006 12:32 pm, Matthew Garrett wrote: > On Tue, Dec 19, 2006 at 09:23:05PM +0100, Arjan van de Ven wrote: > > right now the "spec" for Linux network drivers assumes that you put the > > NIC into D3 on down, except for cases where Wake-on-Lan is enabled etc. > > Really? I ca

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread David Brownell
On Tuesday 19 December 2006 10:52 am, Matthew Garrett wrote: > Commit 047bda36150d11422b2c7bacca1df324c909c0b3 broke userspace. Actually, no ... that just prevented breakage enabled by commit cbd69dbbf1adfce6e048f15afc8629901ca9dae5 which taught PCI how to use the new irqs-off suspend_late()/resum

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Arjan van de Ven
On Tue, 2006-12-19 at 20:32 +, Matthew Garrett wrote: > On Tue, Dec 19, 2006 at 09:23:05PM +0100, Arjan van de Ven wrote: > > On Tue, 2006-12-19 at 20:08 +, Matthew Garrett wrote: > > > I'm not sure. Suspending the chip means you lose things like link beat > > > detection, so it's not some

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
On Tue, Dec 19, 2006 at 09:23:05PM +0100, Arjan van de Ven wrote: > On Tue, 2006-12-19 at 20:08 +, Matthew Garrett wrote: > > I'm not sure. Suspending the chip means you lose things like link beat > > detection, so it's not something you necessarily want to automatically > > tie to something

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Arjan van de Ven
On Tue, 2006-12-19 at 20:08 +, Matthew Garrett wrote: > On Tue, Dec 19, 2006 at 09:03:21PM +0100, Arjan van de Ven wrote: > > > humm shouldn't the driver do this when the interface is brought down? > > sounds like you're playing with fire to do this behind the drivers' > > back > > I'm no

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
On Tue, Dec 19, 2006 at 09:03:21PM +0100, Arjan van de Ven wrote: > humm shouldn't the driver do this when the interface is brought down? > sounds like you're playing with fire to do this behind the drivers' > back I'm not sure. Suspending the chip means you lose things like link beat detect

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Arjan van de Ven
On Tue, 2006-12-19 at 19:44 +, Matthew Garrett wrote: > On Tue, Dec 19, 2006 at 08:34:48PM +0100, Arjan van de Ven wrote: > > > which userspace is using this btw? > > Ubuntu uses it to disable wireless hardware under certain circumstances. > I believe that Suse's powernowd uses it to power d

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
On Tue, Dec 19, 2006 at 08:34:48PM +0100, Arjan van de Ven wrote: > which userspace is using this btw? Ubuntu uses it to disable wireless hardware under certain circumstances. I believe that Suse's powernowd uses it to power down wired ethernet hardware when it's not in use. -- Matthew Garret

Re: Changes to sysfs PM layer break userspace

2006-12-19 Thread Arjan van de Ven
On Tue, 2006-12-19 at 18:52 +, Matthew Garrett wrote: > Commit 047bda36150d11422b2c7bacca1df324c909c0b3 broke userspace. > Previously, /sys/bus/pci/devices/foo/power/state could have values > echoed into it for triggering suspend/resume calls in the driver. The > breakage is handily mentione