All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] 2.4.22-pre7 : ACPI poweroff fix
@ 2003-07-24 20:59 Grover, Andrew
  2003-07-24 21:02 ` Marcelo Tosatti
  0 siblings, 1 reply; 5+ messages in thread
From: Grover, Andrew @ 2003-07-24 20:59 UTC (permalink / raw)
  To: Marcelo Tosatti, Willy Tarreau; +Cc: lkml

Marcelo (and Willy),

Sorry if I've been unresponsive. Looks good to me.

Thanks -- Regards -- Andy

> -----Original Message-----
> From: Marcelo Tosatti [mailto:marcelo@conectiva.com.br] 
> Sent: Thursday, July 24, 2003 6:23 AM
> To: Willy Tarreau; Grover, Andrew
> Cc: lkml
> Subject: Re: [PATCH] 2.4.22-pre7 : ACPI poweroff fix
> 
> 
> 
> Andrew,
> 
> What is your opinion on this patch?
> 
> On Wed, 23 Jul 2003, Willy Tarreau wrote:
> 
> > Hi Marcelo,
> >
> > [ this is a resend, there has been a delivery failure at 
> conectiva. If
> >   you want, I can forward you the copy from the mailer daemon ]
> >
> > here are those fixes again. I have received a second report that it
> > fixed the ACPI poweroff bug (this time, for <cijoml@volny.cz>).
> > IIRC, when you unroll the code, it's obviously buggy because a
> > function (of which I don't remember the name, it's 3 months old) is
> > called explicitely for state=S5, but avoids this value within the
> > tests !
> >
> > Please apply it, or ask Andrew for some feedback. It seems as if he
> > doesn't receive my emails, I've sent him these patches 2 or 3 times
> > since, including one on the acpi-devel list, but never got any
> > feedback (or I had no luck and mailed him during his hollidays) :-(
> >
> > Unfortunately, I have not kept the original mail containing my
> > analysis of the problem at this time.
> >
> > Thanks in advance,
> > Willy
> >
> > ----- Forwarded message from Willy Tarreau <willy@w.ods.org> -----
> >
> > Date: 	Thu, 10 Jul 2003 09:58:50 +0200
> > From: Willy Tarreau <willy@w.ods.org>
> > To: Aschwin Marsman <a.marsman@aYniK.com>
> > Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
> >        lkml <linux-kernel@vger.kernel.org>
> > Subject: Re: Linux 2.4.22-pre4
> > In-Reply-To: 
> <Pine.LNX.4.44.0307100717570.18695-100000@localhost.localdomain>
> > User-Agent: Mutt/1.4i
> > Precedence: bulk
> > X-Mailing-List: 	linux-kernel@vger.kernel.org
> >
> > Hi !
> >
> > On Thu, Jul 10, 2003 at 07:23:32AM +0200, Aschwin Marsman wrote:
> > > On Wed, 9 Jul 2003, Marcelo Tosatti wrote:
> > >
> > > > Hi,
> > > >
> > > > Here goes -pre4. It contains a lot of updates and fixes.
> > > >
> > > > We decided to include this new code quota code which 
> allows usage of
> > > > quotas with 32bit UID/GIDs.
> > > >
> > > > Most Toshibas should work now due to an important ACPI fix.
> > > >
> > > > Please help and test.
> > >
> > > I use -pre3 with succes, only power down is currently not working
> > > (only the discs shutdown, no real poweroff). That's why I disabled
> > > apm and enabled apm in the kernel with -pre4, but that gives:
> >
> > I remember having had problems with ACPI because my power 
> off didn't work.
> > After reading through the code, I noticed that due to 
> erroneous comparisons,
> > some code path would never be executed, and/or some 
> preparatory work before
> > entering S5 would be done twice, or could not recover from 
> error, I don't
> > recall exactly. So I sent the two patches below to the 
> acpi-devel list twice,
> > but never got any reply.
> >
> > I don't even know if they still apply, but you can try them 
> anyway, they're
> > simple.
> >
> > If I recall correctly, the first one should be enough to 
> poweroff with a simple
> > "echo 5 > /proc/acpi/sleep", while the second one allows 
> the system to use this
> > for poweroff.
> >
> > Cheers,
> > Willy
> >
> >
> > --- ./drivers/acpi/system.c-orig	Tue Apr 29 17:39:34 2003
> > +++ ./drivers/acpi/system.c	Tue Apr 29 19:08:09 2003
> > @@ -180,7 +180,7 @@
> >  			return AE_ERROR;
> >  	}
> >
> > -	if (state < ACPI_STATE_S5) {
> > +	if (state <= ACPI_STATE_S5) {
> >  		/* Tell devices to stop I/O and actually save 
> their state.
> >  		 * It is theoretically possible that something 
> could fail,
> >  		 * so handle that gracefully..
> > @@ -277,6 +277,7 @@
> >
> >  	switch (state) {
> >  	case ACPI_STATE_S1:
> > +	case ACPI_STATE_S5:
> >  		barrier();
> >  		status = acpi_enter_sleep_state(state);
> >  		break;
> >
> >
> >
> > --- ./drivers/acpi/system.c-orig	Tue Apr 29 19:09:19 2003
> > +++ ./drivers/acpi/system.c	Tue Apr 29 19:36:08 2003
> > @@ -90,9 +90,7 @@
> >  static void
> >  acpi_power_off (void)
> >  {
> > -	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
> > -	ACPI_DISABLE_IRQS();
> > -	acpi_enter_sleep_state(ACPI_STATE_S5);
> > +	acpi_suspend(ACPI_STATE_S5);
> >  }
> >
> >  #endif /*CONFIG_PM*/
> >
> >
> >
> >
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] 2.4.22-pre7 : ACPI poweroff fix
  2003-07-24 20:59 [PATCH] 2.4.22-pre7 : ACPI poweroff fix Grover, Andrew
@ 2003-07-24 21:02 ` Marcelo Tosatti
  2003-07-30  7:29   ` [PATCH] 2.4.22-pre9 " Willy Tarreau
  0 siblings, 1 reply; 5+ messages in thread
From: Marcelo Tosatti @ 2003-07-24 21:02 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: Willy Tarreau, lkml


Great. I`ll apply it to the 2.4 tree later and it will be present in
-pre9.

Thanks Willy, Andrew.

On Thu, 24 Jul 2003, Grover, Andrew wrote:

> Marcelo (and Willy),
>
> Sorry if I've been unresponsive. Looks good to me.
>
> Thanks -- Regards -- Andy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] 2.4.22-pre9 : ACPI poweroff fix
  2003-07-24 21:02 ` Marcelo Tosatti
@ 2003-07-30  7:29   ` Willy Tarreau
  2003-07-30  8:03     ` [PATCH] 2.6.0-test2 " Behdad Esfahbod
  0 siblings, 1 reply; 5+ messages in thread
From: Willy Tarreau @ 2003-07-30  7:29 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Grover, Andrew, lkml

On Thu, Jul 24, 2003 at 06:02:15PM -0300, Marcelo Tosatti wrote:
> 
> Great. I`ll apply it to the 2.4 tree later and it will be present in
> -pre9.

Hi Marcelo,

it seems you forgot the patch in -pre9. Never mind, I've just rediffed it,
here it is.

Cheers,
Willy


diff -urN linux-2.4.22-pre9/drivers/acpi/system.c linux-2.4.22-pre9-fix/drivers/acpi/system.c
--- linux-2.4.22-pre9/drivers/acpi/system.c	Wed Jul 30 09:18:40 2003
+++ linux-2.4.22-pre9-fix/drivers/acpi/system.c	Wed Jul 30 09:21:56 2003
@@ -90,9 +90,7 @@
 static void
 acpi_power_off (void)
 {
-	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
-	ACPI_DISABLE_IRQS();
-	acpi_enter_sleep_state(ACPI_STATE_S5);
+	acpi_suspend(ACPI_STATE_S5);
 }
 
 #endif /*CONFIG_PM*/
@@ -180,7 +178,7 @@
 			return AE_ERROR;
 	}
 
-	if (state < ACPI_STATE_S5) {
+	if (state <= ACPI_STATE_S5) {
 		/* Tell devices to stop I/O and actually save their state.
 		 * It is theoretically possible that something could fail,
 		 * so handle that gracefully..



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] 2.6.0-test2 : ACPI poweroff fix
  2003-07-30  7:29   ` [PATCH] 2.4.22-pre9 " Willy Tarreau
@ 2003-07-30  8:03     ` Behdad Esfahbod
  0 siblings, 0 replies; 5+ messages in thread
From: Behdad Esfahbod @ 2003-07-30  8:03 UTC (permalink / raw)
  To: lkml

Hi,

The same patch fixes ACPI poweroff problem on my machine with 
2.6.0-test2 too.  Well, it should be applied to acpi/sleep/main.c 
and acpi/sleep/poweroff.c

On Wed, 30 Jul 2003, Willy Tarreau wrote:

> On Thu, Jul 24, 2003 at 06:02:15PM -0300, Marcelo Tosatti wrote:
> > 
> > Great. I`ll apply it to the 2.4 tree later and it will be present in
> > -pre9.
> 
> Hi Marcelo,
> 
> it seems you forgot the patch in -pre9. Never mind, I've just rediffed it,
> here it is.
> 
> Cheers,
> Willy
> 
> 
> diff -urN linux-2.4.22-pre9/drivers/acpi/system.c linux-2.4.22-pre9-fix/drivers/acpi/system.c
> --- linux-2.4.22-pre9/drivers/acpi/system.c	Wed Jul 30 09:18:40 2003
> +++ linux-2.4.22-pre9-fix/drivers/acpi/system.c	Wed Jul 30 09:21:56 2003
> @@ -90,9 +90,7 @@
>  static void
>  acpi_power_off (void)
>  {
> -	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
> -	ACPI_DISABLE_IRQS();
> -	acpi_enter_sleep_state(ACPI_STATE_S5);
> +	acpi_suspend(ACPI_STATE_S5);
>  }
>  
>  #endif /*CONFIG_PM*/
> @@ -180,7 +178,7 @@
>  			return AE_ERROR;
>  	}
>  
> -	if (state < ACPI_STATE_S5) {
> +	if (state <= ACPI_STATE_S5) {
>  		/* Tell devices to stop I/O and actually save their state.
>  		 * It is theoretically possible that something could fail,
>  		 * so handle that gracefully..
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
Behdad Esfahbod		8 Mordad 1382, 2003 Jul 30 
http://behdad.org/	[Finger for Geek Code]

If you do a job too well, you'll get stuck with it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] 2.4.22-pre7 : ACPI poweroff fix
       [not found] <20030723194652.GA29893@alpha.home.local>
@ 2003-07-24 13:23 ` Marcelo Tosatti
  0 siblings, 0 replies; 5+ messages in thread
From: Marcelo Tosatti @ 2003-07-24 13:23 UTC (permalink / raw)
  To: Willy Tarreau, Grover, Andrew; +Cc: lkml


Andrew,

What is your opinion on this patch?

On Wed, 23 Jul 2003, Willy Tarreau wrote:

> Hi Marcelo,
>
> [ this is a resend, there has been a delivery failure at conectiva. If
>   you want, I can forward you the copy from the mailer daemon ]
>
> here are those fixes again. I have received a second report that it
> fixed the ACPI poweroff bug (this time, for <cijoml@volny.cz>).
> IIRC, when you unroll the code, it's obviously buggy because a
> function (of which I don't remember the name, it's 3 months old) is
> called explicitely for state=S5, but avoids this value within the
> tests !
>
> Please apply it, or ask Andrew for some feedback. It seems as if he
> doesn't receive my emails, I've sent him these patches 2 or 3 times
> since, including one on the acpi-devel list, but never got any
> feedback (or I had no luck and mailed him during his hollidays) :-(
>
> Unfortunately, I have not kept the original mail containing my
> analysis of the problem at this time.
>
> Thanks in advance,
> Willy
>
> ----- Forwarded message from Willy Tarreau <willy@w.ods.org> -----
>
> Date: 	Thu, 10 Jul 2003 09:58:50 +0200
> From: Willy Tarreau <willy@w.ods.org>
> To: Aschwin Marsman <a.marsman@aYniK.com>
> Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
>        lkml <linux-kernel@vger.kernel.org>
> Subject: Re: Linux 2.4.22-pre4
> In-Reply-To: <Pine.LNX.4.44.0307100717570.18695-100000@localhost.localdomain>
> User-Agent: Mutt/1.4i
> Precedence: bulk
> X-Mailing-List: 	linux-kernel@vger.kernel.org
>
> Hi !
>
> On Thu, Jul 10, 2003 at 07:23:32AM +0200, Aschwin Marsman wrote:
> > On Wed, 9 Jul 2003, Marcelo Tosatti wrote:
> >
> > > Hi,
> > >
> > > Here goes -pre4. It contains a lot of updates and fixes.
> > >
> > > We decided to include this new code quota code which allows usage of
> > > quotas with 32bit UID/GIDs.
> > >
> > > Most Toshibas should work now due to an important ACPI fix.
> > >
> > > Please help and test.
> >
> > I use -pre3 with succes, only power down is currently not working
> > (only the discs shutdown, no real poweroff). That's why I disabled
> > apm and enabled apm in the kernel with -pre4, but that gives:
>
> I remember having had problems with ACPI because my power off didn't work.
> After reading through the code, I noticed that due to erroneous comparisons,
> some code path would never be executed, and/or some preparatory work before
> entering S5 would be done twice, or could not recover from error, I don't
> recall exactly. So I sent the two patches below to the acpi-devel list twice,
> but never got any reply.
>
> I don't even know if they still apply, but you can try them anyway, they're
> simple.
>
> If I recall correctly, the first one should be enough to poweroff with a simple
> "echo 5 > /proc/acpi/sleep", while the second one allows the system to use this
> for poweroff.
>
> Cheers,
> Willy
>
>
> --- ./drivers/acpi/system.c-orig	Tue Apr 29 17:39:34 2003
> +++ ./drivers/acpi/system.c	Tue Apr 29 19:08:09 2003
> @@ -180,7 +180,7 @@
>  			return AE_ERROR;
>  	}
>
> -	if (state < ACPI_STATE_S5) {
> +	if (state <= ACPI_STATE_S5) {
>  		/* Tell devices to stop I/O and actually save their state.
>  		 * It is theoretically possible that something could fail,
>  		 * so handle that gracefully..
> @@ -277,6 +277,7 @@
>
>  	switch (state) {
>  	case ACPI_STATE_S1:
> +	case ACPI_STATE_S5:
>  		barrier();
>  		status = acpi_enter_sleep_state(state);
>  		break;
>
>
>
> --- ./drivers/acpi/system.c-orig	Tue Apr 29 19:09:19 2003
> +++ ./drivers/acpi/system.c	Tue Apr 29 19:36:08 2003
> @@ -90,9 +90,7 @@
>  static void
>  acpi_power_off (void)
>  {
> -	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
> -	ACPI_DISABLE_IRQS();
> -	acpi_enter_sleep_state(ACPI_STATE_S5);
> +	acpi_suspend(ACPI_STATE_S5);
>  }
>
>  #endif /*CONFIG_PM*/
>
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-30  7:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 20:59 [PATCH] 2.4.22-pre7 : ACPI poweroff fix Grover, Andrew
2003-07-24 21:02 ` Marcelo Tosatti
2003-07-30  7:29   ` [PATCH] 2.4.22-pre9 " Willy Tarreau
2003-07-30  8:03     ` [PATCH] 2.6.0-test2 " Behdad Esfahbod
     [not found] <20030723194652.GA29893@alpha.home.local>
2003-07-24 13:23 ` [PATCH] 2.4.22-pre7 " Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.