Re: Suspend/resume semantics for ISDN drivers (was: NAK new drivers without proper power management?)

2007-03-08 Thread Pavel Machek
Hi! > > On 12.02.2007 01:10 I wrote: > > > I don't doubt your basic assessment. However it doesn't translate that > > > easily into a real implementation. In my case, I maintain a USB driver, > > > so I have to deal with USB specifics of suspend/resume which happen not > > > to be that well docume

Re: Suspend/resume semantics for ISDN drivers (was: NAK new drivers without proper power management?)

2007-03-04 Thread Rafael J. Wysocki
On Saturday, 3 March 2007 23:48, Tilman Schmidt wrote: > Ok, I've thought some more but I still don't know ... > > On 12.02.2007 01:10 I wrote: > > I don't doubt your basic assessment. However it doesn't translate that > > easily into a real implementation. In my case, I maintain a USB driver, > >

Suspend/resume semantics for ISDN drivers (was: NAK new drivers without proper power management?)

2007-03-03 Thread Tilman Schmidt
Ok, I've thought some more but I still don't know ... On 12.02.2007 01:10 I wrote: > I don't doubt your basic assessment. However it doesn't translate that > easily into a real implementation. In my case, I maintain a USB driver, > so I have to deal with USB specifics of suspend/resume which happe

Re: NAK new drivers without proper power management?

2007-02-14 Thread Stefan Richter
Rafael J. Wysocki wrote: >> Why a new flag? > > For example, there are drivers that define .suspend() and .resume() which > do not work correctly and we can use the flag to mark them. Depending on how serious the problems with these .suspend/.resume()s are, you could also put a printk in them or

Re: NAK new drivers without proper power management?

2007-02-13 Thread Pavel Machek
Hi! > > >I would disagree that it's a peripheral issue, it's pretty core these > > >days, at least for any hardware that you can stuff in a laptop (though a > > >fair number of desktops get suspended and resumed these days too). > > > > Servers are still the most important Linux market, and don't

Re: NAK new drivers without proper power management?

2007-02-13 Thread Rafael J. Wysocki
On Tuesday, 13 February 2007 10:42, Tilman Schmidt wrote: > Rafael J. Wysocki schrieb: > > I think we can introduce a "pm_safe" flag that will indicate if the driver > > handles suspend/resume correctly. If we do it, we can flag all of the > > drivers > > currently in the tree as "pm_safe" unless

Re: NAK new drivers without proper power management?

2007-02-13 Thread Pavel Machek
Hi! > > I think your experience is rather different than that of Joe Average > > User who doesn't frequent kernel lists, and also I think you'll find > > that for a lot of Linux laptop users that don't use supend, the reason > > is that it doesn't work reliably, quite often due to driver issues

Re: NAK new drivers without proper power management?

2007-02-13 Thread Christoph Hellwig
On Tue, Feb 13, 2007 at 10:55:18AM -0500, Mark Lord wrote: > LKML is much more receptive to drivers that follow > the "release early, release often" mantra. Exactly. > Which means we really have to be more accomodating of > drivers that start out simple, and then gain all of the > non-essential c

Re: NAK new drivers without proper power management?

2007-02-13 Thread Mark Lord
Nigel Cunningham wrote: On Sun, 2007-02-11 at 01:27 +0100, Rafael J. Wysocki wrote: Plus: - What if I'm planning to implement the power managemet, but not just right now? Why not right now? LKML is much more receptive to drivers that follow the "release early, release often" mantra. Which m

Re: NAK new drivers without proper power management?

2007-02-13 Thread Brad Campbell
Willy Tarreau wrote: Probably that you got the wrong laptop. If you buy an ultra-thin with highly proprietary hardware, it may be hard. But if you choose in profesionnal ranges, there is rarely any problem. I have a compaq nc8000 on which everything works fine, and it boots in about 20 seconds.

Re: NAK new drivers without proper power management?

2007-02-13 Thread Tilman Schmidt
Geert Uytterhoeven schrieb: > On Mon, 12 Feb 2007, Pavel Machek wrote: >> > Can't the upper layer just assume -ENOSYS if .resume/.suspend is NULL? >> > It's nicer if you don't have to implement dummy functions at all. >> >> Unfortunately, drivers currently assume "NULL == nothing is needed", Mor

Re: NAK new drivers without proper power management?

2007-02-13 Thread Tilman Schmidt
Rafael J. Wysocki schrieb: > I think we can introduce a "pm_safe" flag that will indicate if the driver > handles suspend/resume correctly. If we do it, we can flag all of the drivers > currently in the tree as "pm_safe" unless we know that they aren't. Next, > we can convert the core to fail the

Re: NAK new drivers without proper power management?

2007-02-12 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 21:06 +0100, Rafael J. Wysocki wrote: > On Monday, 12 February 2007 05:08, Nigel Cunningham wrote: > > Nope. I'm assuming that the driver author knows what needs to be done to > > get the driver out of whatever state the BIOS puts it in to start with, > > and into an oper

Re: NAK new drivers without proper power management?

2007-02-12 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 06:19 +0100, Willy Tarreau wrote: > One less "myth" as Nigel would say call it ;-) You know me too well! :> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kerne

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 22:24, Nigel Cunningham wrote: > Hi. > > On Mon, 2007-02-12 at 22:01 +0100, Rafael J. Wysocki wrote: > > On Monday, 12 February 2007 21:58, Pavel Machek wrote: > > > Hi! > > > > > > > > > If all you need to do is say 'I don't need to do anything' and we > > > > > > ha

Re: NAK new drivers without proper power management?

2007-02-12 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 22:01 +0100, Rafael J. Wysocki wrote: > On Monday, 12 February 2007 21:58, Pavel Machek wrote: > > Hi! > > > > > > > If all you need to do is say 'I don't need to do anything' and we > > > > > have a > > > > > shared function that does that, all we're talking about doin

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 21:58, Pavel Machek wrote: > Hi! > > > > > If all you need to do is say 'I don't need to do anything' and we have a > > > > shared function that does that, all we're talking about doing is adding > > > > to your struct pci_device (or whatever) > > > > > > > > .resume =

Re: NAK new drivers without proper power management?

2007-02-12 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 16:57 +0100, Geert Uytterhoeven wrote: > On Mon, 12 Feb 2007, Pavel Machek wrote: > > > Can't the upper layer just assume -ENOSYS if .resume/.suspend is NULL? > > > It's nicer if you don't have to implement dummy functions at all. > > > > Unfortunately, drivers currently

Re: NAK new drivers without proper power management?

2007-02-12 Thread Pavel Machek
Hi! > > > If all you need to do is say 'I don't need to do anything' and we have a > > > shared function that does that, all we're talking about doing is adding > > > to your struct pci_device (or whatever) > > > > > > .resume = generic_empty_resume; > > > > > > To me at least, that doesn't look

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 17:52, Pavel Machek wrote: > Hi! > > > > > > > Neither am I. I'm just asking that new drivers have power > > > > > > management as > > > > > > standard. > > > > > > > > > What if the hardware doesn't support power management ? > > > > > > > > You would still want to do

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 13:59, Gerhard Mack wrote: > On Sun, 11 Feb 2007, Willy Tarreau wrote: > > > On Sun, Feb 11, 2007 at 09:37:06AM +1100, Nigel Cunningham wrote: > > > On Sat, 2007-02-10 at 23:20 +0100, Rafael J. Wysocki wrote: > > > > Many people also have Linux on their notebooks, but

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 06:19, Willy Tarreau wrote: > On Mon, Feb 12, 2007 at 12:26:52AM +, Alan wrote: > > > Unless I'm mistaken, I have to type the passphrase twice then : > > > - once at suspend > > > - once at resume > > > > > > which is once more per "boot" than what I'm doing on

Re: NAK new drivers without proper power management?

2007-02-12 Thread Rafael J. Wysocki
On Monday, 12 February 2007 05:08, Nigel Cunningham wrote: > Howdy! > > On Mon, 2007-02-12 at 01:10 +0100, Tilman Schmidt wrote: > > Hi, > > > > Am 11.02.2007 23:37 schrieb Nigel Cunningham: > > > On Sun, 2007-02-11 at 00:45 +0100, Tilman Schmidt wrote: > > >> Am 10.02.2007 23:37 schrieb Nigel Cu

Re: NAK new drivers without proper power management?

2007-02-12 Thread Willy Tarreau
On Mon, Feb 12, 2007 at 07:59:40AM -0500, Gerhard Mack wrote: > On Sun, 11 Feb 2007, Willy Tarreau wrote: > > > On Sun, Feb 11, 2007 at 09:37:06AM +1100, Nigel Cunningham wrote: > > > On Sat, 2007-02-10 at 23:20 +0100, Rafael J. Wysocki wrote: > > > > Many people also have Linux on their notebook

Re: NAK new drivers without proper power management?

2007-02-12 Thread Pavel Machek
Hi! > > > > "If the device requires that, implement .suspend and .resume or at least > > > > > > > define .suspend that will always return -ENOSYS (then people will know > > > > they > > > ^^^

Re: NAK new drivers without proper power management?

2007-02-12 Thread Pavel Machek
Hi! > > > > > Neither am I. I'm just asking that new drivers have power management > > > > > as > > > > > standard. > > > > > > > What if the hardware doesn't support power management ? > > > > > > You would still want to do the cleanup and configuration that you'd do > > > for module load/unload

Re: NAK new drivers without proper power management?

2007-02-12 Thread Geert Uytterhoeven
On Mon, 12 Feb 2007, Pavel Machek wrote: > > > "If the device requires that, implement .suspend and .resume or at least > > > > > define .suspend that will always return -ENOSYS (then people will know > > > they > > ^

Re: NAK new drivers without proper power management?

2007-02-12 Thread Pavel Machek
Hi! > > "If the device requires that, implement .suspend and .resume or at least > > > define .suspend that will always return -ENOSYS (then people will know they > ^^^ > > have

Re: NAK new drivers without proper power management?

2007-02-12 Thread Tino Keitel
On Sun, Feb 11, 2007 at 07:46:36 +0100, Willy Tarreau wrote: [...] > Many people also have Linux on their notebooks, but as a dual-boot. You > read the word ? "dual-boot". It means that they cleanly shutdown their > system every time they don't use it anymore, and they won't know what > OS they'l

Re: NAK new drivers without proper power management?

2007-02-12 Thread Gerhard Mack
On Sun, 11 Feb 2007, Willy Tarreau wrote: > On Sun, Feb 11, 2007 at 09:37:06AM +1100, Nigel Cunningham wrote: > > On Sat, 2007-02-10 at 23:20 +0100, Rafael J. Wysocki wrote: > > Many people also have Linux on their notebooks, but as a dual-boot. You > read the word ? "dual-boot". It means that th

Re: NAK new drivers without proper power management?

2007-02-12 Thread Arjan van de Ven
> > By adding dummy functions, wouldn't that just look awkward ? not really; if you have a template pm_no_suspend_needed and pm_no_restore_needed functions, and just make it part of ALL device structs that don't need it.. it's not that bad or maybe pm_generic_no_suspend pm_generic_no_resum

Re: NAK new drivers without proper power management?

2007-02-12 Thread Geert Uytterhoeven
On Sat, 10 Feb 2007, Rafael J. Wysocki wrote: > What about this: > > "If the device requires that, implement .suspend and .resume or at least > define .suspend that will always return -ENOSYS (then people will know they ^

Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Mon, Feb 12, 2007 at 12:26:52AM +, Alan wrote: > > Unless I'm mistaken, I have to type the passphrase twice then : > > - once at suspend > > - once at resume > > > > which is once more per "boot" than what I'm doing on loop-aes. > > You don't need to type in a key at suspend time if yo

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Howdy! On Mon, 2007-02-12 at 01:10 +0100, Tilman Schmidt wrote: > Hi, > > Am 11.02.2007 23:37 schrieb Nigel Cunningham: > > On Sun, 2007-02-11 at 00:45 +0100, Tilman Schmidt wrote: > >> Am 10.02.2007 23:37 schrieb Nigel Cunningham: > >>> If your device requires power management, and you know it r

Re: NAK new drivers without proper power management?

2007-02-11 Thread Robert Hancock
Tilman Schmidt wrote: If your device requires power management, and you know it requires power management, why not just implement power management? [...] Like it or not, power management is far from trivial, and people writing device drivers have limited resources. [...] It's not that complex.

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Monday, 12 February 2007 01:28, Alan wrote: > > +PM support:Since Linux is used on many portable and desktop > > systems, your > > + driver is likely to be used on such a system and therefore it > > + should support basic power management by implementing, if > > +

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
Hi, On Monday, 12 February 2007 01:10, Tilman Schmidt wrote: > Hi, > > Am 11.02.2007 23:37 schrieb Nigel Cunningham: > > On Sun, 2007-02-11 at 00:45 +0100, Tilman Schmidt wrote: > >> Am 10.02.2007 23:37 schrieb Nigel Cunningham: > >>> If your device requires power management, and you know it requ

Re: NAK new drivers without proper power management?

2007-02-11 Thread Alan
> +PM support: Since Linux is used on many portable and desktop systems, your > + driver is likely to be used on such a system and therefore it > + should support basic power management by implementing, if > + necessary, the .suspend and .resume methods used dur

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 01:09 +0100, Rafael J. Wysocki wrote: > On Monday, 12 February 2007 00:55, Nigel Cunningham wrote: > > Hi. > > > > On Mon, 2007-02-12 at 00:50 +0100, Rafael J. Wysocki wrote: > > > On Monday, 12 February 2007 00:47, Nigel Cunningham wrote: > > > > Hi. > > > > > > > > On

Re: NAK new drivers without proper power management?

2007-02-11 Thread Alan
> Unless I'm mistaken, I have to type the passphrase twice then : > - once at suspend > - once at resume > > which is once more per "boot" than what I'm doing on loop-aes. You don't need to type in a key at suspend time if you don't want to. Think about gpg email - I can send you an encrypted

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Monday, 12 February 2007 00:55, Nigel Cunningham wrote: > Hi. > > On Mon, 2007-02-12 at 00:50 +0100, Rafael J. Wysocki wrote: > > On Monday, 12 February 2007 00:47, Nigel Cunningham wrote: > > > Hi. > > > > > > On Mon, 2007-02-12 at 00:41 +0100, Rafael J. Wysocki wrote: > > > > > I'm using M$

Re: NAK new drivers without proper power management?

2007-02-11 Thread Tilman Schmidt
Hi, Am 11.02.2007 23:37 schrieb Nigel Cunningham: > On Sun, 2007-02-11 at 00:45 +0100, Tilman Schmidt wrote: >> Am 10.02.2007 23:37 schrieb Nigel Cunningham: >>> If your device requires power management, and you know it requires power >>> management, why not just implement power management? [...]

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:50 +0100, Rafael J. Wysocki wrote: > On Monday, 12 February 2007 00:47, Nigel Cunningham wrote: > > Hi. > > > > On Mon, 2007-02-12 at 00:41 +0100, Rafael J. Wysocki wrote: > > > > I'm using M$ hibernation and Suspend2 to dual boot on our desktop (dtv > > > > card that

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Monday, 12 February 2007 00:47, Nigel Cunningham wrote: > Hi. > > On Mon, 2007-02-12 at 00:41 +0100, Rafael J. Wysocki wrote: > > > I'm using M$ hibernation and Suspend2 to dual boot on our desktop (dtv > > > card that Linux doesn't support well yet), and I know other Suspend2 > > > users doing

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:41 +0100, Rafael J. Wysocki wrote: > > I'm using M$ hibernation and Suspend2 to dual boot on our desktop (dtv > > card that Linux doesn't support well yet), and I know other Suspend2 > > users doing the same. It's made earier by the fact that Suspend2 lets > > you rebo

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:38 +0100, Willy Tarreau wrote: > On Mon, Feb 12, 2007 at 10:18:42AM +1100, Nigel Cunningham wrote: > [snip] > > > Hmm sorry, but we don't have the same usages of notebooks. For no reason > > > would I keep documents open, for two reasons : > > > > > > - when I shutd

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 23:26, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-02-11 at 22:52 +0100, Willy Tarreau wrote: > > On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > > > Willy Tarreau wrote: > > > >Nigel, don't take it as a personal offense, but I think it is a very >

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 23:46, Willy Tarreau wrote: > On Mon, Feb 12, 2007 at 09:26:26AM +1100, Nigel Cunningham wrote: > > Hi. > > > > On Sun, 2007-02-11 at 22:52 +0100, Willy Tarreau wrote: > > > On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > > > > Willy Tarreau wrote: > >

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:29 +0100, Rafael J. Wysocki wrote: > > On Sun, 2007-02-11 at 01:44 +0100, Rafael J. Wysocki wrote: > > > > Well, it's probably more acceptable than silently doing nothing and the > > > > device failing or locking up the machine on resume, but I couldn't > > > > agree

Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Mon, Feb 12, 2007 at 10:18:42AM +1100, Nigel Cunningham wrote: [snip] > > Hmm sorry, but we don't have the same usages of notebooks. For no reason > > would I keep documents open, for two reasons : > > > > - when I shutdown my notebook, it is to move from one customer to > > home/company/

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 03:25 +0400, Manu Abraham wrote: > On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: > > Hi. > > > > On Mon, 2007-02-12 at 02:57 +0400, Manu Abraham wrote: > > > On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: > > > > > > > Neither am I. I'm just asking that

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 23:40, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-02-11 at 01:44 +0100, Rafael J. Wysocki wrote: > > > Well, it's probably more acceptable than silently doing nothing and the > > > device failing or locking up the machine on resume, but I couldn't agree > > > more

Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > >> > Neither am I. I'm just asking that new drivers have power management as > >> > standard. > > > >> What if the hardware doesn't support power management ? > > > >You would still want to do the cleanup and configuration that you'd do > >for module load/unload. > > > > By adding dummy fun

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:21 +0100, Pavel Machek wrote: > Hi! > > > > > > define .suspend that will always return -ENOSYS (then people will > > > > > know they > > > > > have to unload the driver before the suspend). Similarly, if you > > > > > aren't sure > > > > > whether or not the devic

Re: NAK new drivers without proper power management?

2007-02-11 Thread Manu Abraham
On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: Hi. On Mon, 2007-02-12 at 02:57 +0400, Manu Abraham wrote: > On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: > > > Neither am I. I'm just asking that new drivers have power management as > > standard. > What if the hardware doesn't

Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > > - built in; > > > - modular, loaded while suspending but not loaded prior to resume from > > > disk; > > > - modular, loaded while suspending and loaded prior to resume from disk; > > > > I think we should state the general rule in Documentation/SubmittingDrivers > > and give more detai

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 00:16 +0100, Rafael J. Wysocki wrote: > On Monday, 12 February 2007 00:10, Nigel Cunningham wrote: > > Hi. > > > > On Sun, 2007-02-11 at 21:02 +, Alan wrote: > > > > > "If the device requires that, implement .suspend and .resume or at > > > > > least > > > > > defin

Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > > > define .suspend that will always return -ENOSYS (then people will know > > > > they > > > > have to unload the driver before the suspend). Similarly, if you > > > > aren't sure > > > > whether or not the device requires .suspend and .resume, define > > > > .suspend that > > > > wil

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Monday, 12 February 2007 00:10, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-02-11 at 21:02 +, Alan wrote: > > > > "If the device requires that, implement .suspend and .resume or at least > > > > define .suspend that will always return -ENOSYS (then people will know > > > > they > > > >

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Mon, 2007-02-12 at 02:57 +0400, Manu Abraham wrote: > On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: > > > Neither am I. I'm just asking that new drivers have power management as > > standard. > What if the hardware doesn't support power management ? You would still want to do t

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 23:46 +0100, Willy Tarreau wrote: > > On Sun, 2007-02-11 at 22:52 +0100, Willy Tarreau wrote: > > > On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > > > > Willy Tarreau wrote: > > > > >Nigel, don't take it as a personal offense, but I think it is a very >

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Monday, 12 February 2007 00:06, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-02-11 at 19:53 +0100, Rafael J. Wysocki wrote: > > > Having drivers explicitly marked as to whether they are safe is a good > > > kernel > > > feature; what to do if they're not is policy. > > > > That's true, but

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 21:02 +, Alan wrote: > > > "If the device requires that, implement .suspend and .resume or at least > > > define .suspend that will always return -ENOSYS (then people will know > > > they > > > have to unload the driver before the suspend). Similarly, if you aren't

Re: NAK new drivers without proper power management?

2007-02-11 Thread Alan
> Hmm sorry, but we don't have the same usages of notebooks. For no reason > would I keep documents open, for two reasons : > > - when I shutdown my notebook, it is to move from one customer to > home/company/another customer. There's no related work anyway, the > network will have chang

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 22:02, Alan wrote: > > > "If the device requires that, implement .suspend and .resume or at least > > > define .suspend that will always return -ENOSYS (then people will know > > > they > > > have to unload the driver before the suspend). Similarly, if you aren't > >

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 19:53 +0100, Rafael J. Wysocki wrote: > > Having drivers explicitly marked as to whether they are safe is a good > > kernel > > feature; what to do if they're not is policy. > > That's true, but I assume that the people who opt for doing that are also > willing to take

Re: NAK new drivers without proper power management?

2007-02-11 Thread Manu Abraham
On 2/12/07, Nigel Cunningham <[EMAIL PROTECTED]> wrote: Neither am I. I'm just asking that new drivers have power management as standard. What if the hardware doesn't support power management ? regards, manu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 12:13 +, Matthew Garrett wrote: > On Sun, Feb 11, 2007 at 07:54:04AM +0100, Willy Tarreau wrote: > > > instead of modifying all drivers to explicitly state that they don't support > > it, we should start with a test of the NULL pointer for .suspend which > > should

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 07:46 +0100, Willy Tarreau wrote: > Hi Nigel, > > On Sun, Feb 11, 2007 at 09:37:06AM +1100, Nigel Cunningham wrote: > > On Sat, 2007-02-10 at 23:20 +0100, Rafael J. Wysocki wrote: > (...) > > > What about this: > > > > > > "If the device requires that, implement .suspen

Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Mon, Feb 12, 2007 at 09:26:26AM +1100, Nigel Cunningham wrote: > Hi. > > On Sun, 2007-02-11 at 22:52 +0100, Willy Tarreau wrote: > > On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > > > Willy Tarreau wrote: > > > >Nigel, don't take it as a personal offense, but I think it is a

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
On Sun, 2007-02-11 at 01:27 +0100, Rafael J. Wysocki wrote: > On Sunday, 11 February 2007 00:45, Tilman Schmidt wrote: > > Am 10.02.2007 23:37 schrieb Nigel Cunningham: > > > If your device requires power management, and you know it requires power > > > management, why not just implement power mana

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 01:44 +0100, Rafael J. Wysocki wrote: > > Well, it's probably more acceptable than silently doing nothing and the > > device failing or locking up the machine on resume, but I couldn't agree > > more that it's not what we want to be encouraging. Perfect may be the > >

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 00:45 +0100, Tilman Schmidt wrote: > Am 10.02.2007 23:37 schrieb Nigel Cunningham: > > If your device requires power management, and you know it requires power > > management, why not just implement power management? Doing -ENOSYS > > instead is like saying -ESPAMMEBECAUS

Re: NAK new drivers without proper power management?

2007-02-11 Thread Nigel Cunningham
Hi. On Sun, 2007-02-11 at 22:52 +0100, Willy Tarreau wrote: > On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > > Willy Tarreau wrote: > > >Nigel, don't take it as a personal offense, but I think it is a very > > >centric view of Linux usages. Where I work, Linux is used a lot on >

Re: NAK new drivers without proper power management?

2007-02-11 Thread Tilman Schmidt
Am 11.02.2007 20:42 schrieb Pavel Machek: [...] >> What about this: >> >> "If the device requires that, implement .suspend and .resume or at least >> define .suspend that will always return -ENOSYS (then people will know they >> have to unload the driver before the suspend). Similarly, if you aren

Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Sun, Feb 11, 2007 at 12:31:14PM -0600, Robert Hancock wrote: > Willy Tarreau wrote: > >Nigel, don't take it as a personal offense, but I think it is a very > >centric view of Linux usages. Where I work, Linux is used a lot on > >servers and appliances. It is used for mail relays, HTTP proxies, >

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > > instead of modifying all drivers to explicitly state that they don't > > > support > > > it, we should start with a test of the NULL pointer for .suspend which > > > should > > > mean exactly the same without modifying the drivers. I find it obvious > > > that > > > a driver which doe

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Stefan Richter
Rafael J. Wysocki wrote: > - Problem what to do with drivers that work for some people and don't work > for the others (ie. if we don't flag them as known good, we will break the > setups in which they work) And this issue is independent of whether a driver has .suspend and .resume or not. For exa

Re: NAK new drivers without proper power management?

2007-02-11 Thread Alan
> > "If the device requires that, implement .suspend and .resume or at least > > define .suspend that will always return -ENOSYS (then people will know they > > have to unload the driver before the suspend). Similarly, if you aren't > > sure > > whether or not the device requires .suspend and .re

Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > > > Can we start to NAK new drivers that don't have proper power management > > > > implemented? There really is no excuse for writing a new driver and not > > > > putting .suspend and .resume methods in anymore, is there? > > > > > > to a large degree, a device driver that doesn't suspen

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > Also, I think there are quite some drivers already in the tree that don't > > support suspend/resume explicitly and honestly we should start from adding > > the > > suspend/resume routines to these drivers _before_ we ban new drivers like > > that. > > It'd be relatively quick to modify

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 16:19, Pekka Enberg wrote: > On 2/11/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > Unfortunately it has to be done in one shot for all of the known good > > drivers to avoid > > user-observable regressions. > > No you don't. You can make it a config option that

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 18:27, Daniel Barkalow wrote: > On Sun, 11 Feb 2007, Rafael J. Wysocki wrote: > > > The problem is it was made implicit long ago. The design is "optimistic", > > so > > to speak, and I think we have the following choices: > > > > 1) Change the design to make the kern

Re: NAK new drivers without proper power management?

2007-02-11 Thread Robert Hancock
Willy Tarreau wrote: Nigel, don't take it as a personal offense, but I think it is a very centric view of Linux usages. Where I work, Linux is used a lot on servers and appliances. It is used for mail relays, HTTP proxies, anti-viruses, firewalls, routers, load balancers, UTM, SSH relays, etc...

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Robert Hancock
Matthew Garrett wrote: On Sun, Feb 11, 2007 at 07:54:04AM +0100, Willy Tarreau wrote: instead of modifying all drivers to explicitly state that they don't support it, we should start with a test of the NULL pointer for .suspend which should mean exactly the same without modifying the drivers. I

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Daniel Barkalow
On Sun, 11 Feb 2007, Rafael J. Wysocki wrote: > The problem is it was made implicit long ago. The design is "optimistic", so > to speak, and I think we have the following choices: > > 1) Change the design to make the kernel refuse to suspend if there are any > drivers not explicitly flagged as "

Re: NAK new drivers without proper power management?

2007-02-11 Thread Pavel Machek
Hi! > > > -ENOSYS is just not acceptable. > > > > Well, it's probably more acceptable than silently doing nothing and the > > device failing or locking up the machine on resume, but I couldn't agree > > more that it's not what we want to be encouraging. Perfect may be the > > enemy of the good

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Pekka Enberg
On 2/11/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: Unfortunately it has to be done in one shot for all of the known good drivers to avoid user-observable regressions. No you don't. You can make it a config option that defaults to n during a transition period. - To unsubscribe from this l

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 14:57, Willy Tarreau wrote: > On Sun, Feb 11, 2007 at 02:50:48PM +0100, Rafael J. Wysocki wrote: > > On Sunday, 11 February 2007 14:37, Willy Tarreau wrote: > > > On Sun, Feb 11, 2007 at 01:19:57PM +, Matthew Garrett wrote: > > > > On Sun, Feb 11, 2007 at 02:09:43PM

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Sun, Feb 11, 2007 at 02:50:48PM +0100, Rafael J. Wysocki wrote: > On Sunday, 11 February 2007 14:37, Willy Tarreau wrote: > > On Sun, Feb 11, 2007 at 01:19:57PM +, Matthew Garrett wrote: > > > On Sun, Feb 11, 2007 at 02:09:43PM +0100, Willy Tarreau wrote: > > > > > > > Then change the PCI l

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 14:37, Willy Tarreau wrote: > On Sun, Feb 11, 2007 at 01:19:57PM +, Matthew Garrett wrote: > > On Sun, Feb 11, 2007 at 02:09:43PM +0100, Willy Tarreau wrote: > > > > > Then change the PCI layer to do the basic PM only for known compatible > > > drivers, and modify o

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Sun, Feb 11, 2007 at 01:19:57PM +, Matthew Garrett wrote: > On Sun, Feb 11, 2007 at 02:09:43PM +0100, Willy Tarreau wrote: > > > Then change the PCI layer to do the basic PM only for known compatible > > drivers, and modify only the known-compatible drivers to mark them > > explicitly compa

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Matthew Garrett
On Sun, Feb 11, 2007 at 02:09:43PM +0100, Willy Tarreau wrote: > Then change the PCI layer to do the basic PM only for known compatible > drivers, and modify only the known-compatible drivers to mark them > explicitly compatible. IMHO, it generally is a bad idea to require that > any driver explic

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Willy Tarreau
On Sun, Feb 11, 2007 at 12:13:40PM +, Matthew Garrett wrote: > On Sun, Feb 11, 2007 at 07:54:04AM +0100, Willy Tarreau wrote: > > > instead of modifying all drivers to explicitly state that they don't support > > it, we should start with a test of the NULL pointer for .suspend which > > shoul

Re: NAK new drivers without proper power management?

2007-02-11 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 07:46, Willy Tarreau wrote: [--snip--] > What I really think would be a clean solution would be sort of > a capability. Either the driver *is* suspend/resume-capable, and > the system can be suspended. Or it is not, and the system must > refuse to suspend. It should not

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-11 Thread Matthew Garrett
On Sun, Feb 11, 2007 at 07:54:04AM +0100, Willy Tarreau wrote: > instead of modifying all drivers to explicitly state that they don't support > it, we should start with a test of the NULL pointer for .suspend which should > mean exactly the same without modifying the drivers. I find it obvious tha

Re: [PATCH] Re: NAK new drivers without proper power management?

2007-02-10 Thread Willy Tarreau
On Sat, Feb 10, 2007 at 08:50:27PM +0100, Rafael J. Wysocki wrote: > On Saturday, 10 February 2007 18:52, Daniel Barkalow wrote: > > On Sat, 10 Feb 2007, Rafael J. Wysocki wrote: > > > > > On Saturday, 10 February 2007 11:02, Nigel Cunningham wrote: > > > > > > > Well, the original desire was to s

Re: NAK new drivers without proper power management?

2007-02-10 Thread Willy Tarreau
Hi Nigel, On Sun, Feb 11, 2007 at 09:37:06AM +1100, Nigel Cunningham wrote: > On Sat, 2007-02-10 at 23:20 +0100, Rafael J. Wysocki wrote: (...) > > What about this: > > > > "If the device requires that, implement .suspend and .resume or at least > > define .suspend that will always return -ENOSYS

Re: NAK new drivers without proper power management?

2007-02-10 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 00:20, Robert Hancock wrote: > Nigel Cunningham wrote: > > If your device requires power management, and you know it requires power > > management, why not just implement power management? Doing -ENOSYS > > instead is like saying -ESPAMMEBECAUSEIMLAZY. > > > > Let me pu

Re: NAK new drivers without proper power management?

2007-02-10 Thread Rafael J. Wysocki
On Sunday, 11 February 2007 00:45, Tilman Schmidt wrote: > Am 10.02.2007 23:37 schrieb Nigel Cunningham: > > If your device requires power management, and you know it requires power > > management, why not just implement power management? Doing -ENOSYS > > instead is like saying -ESPAMMEBECAUSEIMLA

  1   2   >