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

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 hardware. It

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 use.

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-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 thing were

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

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 =

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

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

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 since

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 = error; + }

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 + are only

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 version of

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

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

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,

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

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

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

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

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

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

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

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

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

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

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

Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
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 mentioned in the comment: "Devices with bus.suspend_late(), or

Changes to sysfs PM layer break userspace

2006-12-19 Thread Matthew Garrett
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 mentioned in the comment: Devices with bus.suspend_late(), or

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 mentioned

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

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 down

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

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 not sure.

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 like

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 something

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

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 can't find

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 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 to

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 unsubscribe

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, put a nice

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 printk(this is

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 since August