public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [buggy index field handling] [patch]
@ 2003-09-23 17:27 Moore, Robert
       [not found] ` <D3A3AA459175A44CB5326F26DA7A189C1C3D88-sBd4vmA9Se58QrAoInS571DQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Moore, Robert @ 2003-09-23 17:27 UTC (permalink / raw)
  To: Ducrot Bruno, Grover, Andrew
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Robert Vollmert,
	Mads Paulin

Is this the final patch?  If so, we will integrate it into the ACPI CA
core
Bob


-----Original Message-----
From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Ducrot
Bruno
Sent: Monday, September 22, 2003 10:19 AM
To: Grover, Andrew
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Robert Vollmert; Mads Paulin
Subject: [ACPI] [buggy index field handling] [patch]

Hi Andy,

There is a funny bug in acpi/executer/exfldio.c::acpi_ex_field_datum_io

When the field come from an indexed one, we read all the time from the
address obj_desc->index_field.value
Unfortunately, this is wrong, since the correct address is
obviously &obj_desc->index_field.value + field_datum_byte_offset





--- linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22
17:09:20	1.1
+++ linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22
17:10:11
@@ -425,7 +425,7 @@
 		/* Write the index value to the index_register (itself a
region_field) */
 
 		status = acpi_ex_insert_into_field
(obj_desc->index_field.index_obj,
-				 &obj_desc->index_field.value,
+				 &obj_desc->index_field.value +
field_datum_byte_offset,
 				 sizeof (obj_desc->index_field.value));
 		if (ACPI_FAILURE (status)) {
 			return_ACPI_STATUS (status);



Cheers,

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Acpi-devel mailing list
Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [buggy index field handling] [patch]
@ 2003-09-23 21:26 Moore, Robert
  0 siblings, 0 replies; 8+ messages in thread
From: Moore, Robert @ 2003-09-23 21:26 UTC (permalink / raw)
  To: Ducrot Bruno, Grover, Andrew
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Robert Vollmert,
	Mads Paulin

Please send me some ASL code that exhibits the problem so I can analyze
and verify.

Thanks,
Bob


-----Original Message-----
From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Ducrot
Bruno
Sent: Monday, September 22, 2003 10:36 AM
To: Grover, Andrew
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Robert Vollmert; Mads Paulin
Subject: Re: [ACPI] [buggy index field handling] [patch]

On Mon, Sep 22, 2003 at 07:18:47PM +0200, Ducrot Bruno wrote:
> Hi Andy,
> 
> There is a funny bug in
acpi/executer/exfldio.c::acpi_ex_field_datum_io
> 
> When the field come from an indexed one, we read all the time from the
> address obj_desc->index_field.value
> Unfortunately, this is wrong, since the correct address is
> obviously &obj_desc->index_field.value + field_datum_byte_offset

Ok, that one should be OK, now.  My apologize for the first one.


--- linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22
17:09:20	1.1
+++ linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22
17:31:55
@@ -413,6 +413,8 @@
 
 
 	case ACPI_TYPE_LOCAL_INDEX_FIELD:
+		{
+		u32 old_addr = 0;
 
 
 		/* Ensure that the index_value is not beyond the
capacity of the register */
@@ -424,9 +426,12 @@
 
 		/* Write the index value to the index_register (itself a
region_field) */
 
+		old_addr = obj_desc->index_field.value;
+		obj_desc->index_field.value += field_datum_byte_offset;
 		status = acpi_ex_insert_into_field
(obj_desc->index_field.index_obj,
-				 &obj_desc->index_field.value,
+				 &obj_desc->index_field.value +
field_datum_byte_offset,
 				 sizeof (obj_desc->index_field.value));
+		obj_desc->index_field.value = old_address;
 		if (ACPI_FAILURE (status)) {
 			return_ACPI_STATUS (status);
 		}
@@ -443,6 +448,7 @@
 			status = acpi_ex_insert_into_field
(obj_desc->index_field.data_obj,
 					  value,
obj_desc->common_field.access_byte_width);
 		}
+		}
 		break;
 
 

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Acpi-devel mailing list
Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [buggy index field handling] [patch]
@ 2003-09-22 17:18 Ducrot Bruno
       [not found] ` <20030922171847.GN11391-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ducrot Bruno @ 2003-09-22 17:18 UTC (permalink / raw)
  To: Grover, Andrew
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Robert Vollmert,
	Mads Paulin

Hi Andy,

There is a funny bug in acpi/executer/exfldio.c::acpi_ex_field_datum_io

When the field come from an indexed one, we read all the time from the
address obj_desc->index_field.value
Unfortunately, this is wrong, since the correct address is
obviously &obj_desc->index_field.value + field_datum_byte_offset





--- linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22 17:09:20	1.1
+++ linux-2.6.0-test5/drivers/acpi/executer/exfldio.c	2003/09/22 17:10:11
@@ -425,7 +425,7 @@
 		/* Write the index value to the index_register (itself a region_field) */
 
 		status = acpi_ex_insert_into_field (obj_desc->index_field.index_obj,
-				 &obj_desc->index_field.value,
+				 &obj_desc->index_field.value + field_datum_byte_offset,
 				 sizeof (obj_desc->index_field.value));
 		if (ACPI_FAILURE (status)) {
 			return_ACPI_STATUS (status);



Cheers,

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2003-09-26 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-23 17:27 [buggy index field handling] [patch] Moore, Robert
     [not found] ` <D3A3AA459175A44CB5326F26DA7A189C1C3D88-sBd4vmA9Se58QrAoInS571DQ4js95KgL@public.gmane.org>
2003-09-23 18:13   ` Ducrot Bruno
2003-09-26 17:08   ` Nate Lawson
  -- strict thread matches above, loose matches on Subject: below --
2003-09-23 21:26 Moore, Robert
2003-09-22 17:18 Ducrot Bruno
     [not found] ` <20030922171847.GN11391-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2003-09-22 17:25   ` Ducrot Bruno
2003-09-22 17:36   ` Ducrot Bruno
     [not found]     ` <20030922173615.GP11391-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2003-09-22 18:02       ` Ducrot Bruno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox