public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pnpacpi mishandles port io ADDRESS resources
@ 2006-06-10 16:41 Matthew Wilcox
  2006-06-10 20:51 ` Matthieu CASTET
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2006-06-10 16:41 UTC (permalink / raw)
  To: linux-acpi, ambx1; +Cc: linux-kernel


ACPI ADDRESSn resources can describe both memory and port io, but the
current code assumes they're descibing memory, which isn't true for HP's
ia64 systems.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

--- a/drivers/pnp/pnpacpi/rsparser.c	4 Feb 2006 04:51:56 -0000	1.7
+++ b/drivers/pnp/pnpacpi/rsparser.c	10 Jun 2006 16:27:48 -0000
@@ -221,19 +221,34 @@ static acpi_status pnpacpi_allocated_res
 				res->data.fixed_memory32.address_length);
 		break;
 	case ACPI_RESOURCE_TYPE_ADDRESS16:
-		pnpacpi_parse_allocated_memresource(res_table,
-				res->data.address16.minimum,
-				res->data.address16.address_length);
+		if (res->data.address.resource_type == 0)
+			pnpacpi_parse_allocated_memresource(res_table,
+					res->data.address16.minimum,
+					res->data.address16.address_length);
+		else if (res->data.address.resource_type == 1)
+			pnpacpi_parse_allocated_ioresource(res_table,
+					res->data.address16.minimum,
+					res->data.address16.address_length);
 		break;
 	case ACPI_RESOURCE_TYPE_ADDRESS32:
-		pnpacpi_parse_allocated_memresource(res_table,
-				res->data.address32.minimum,
-				res->data.address32.address_length);
+		if (res->data.address.resource_type == 0)
+			pnpacpi_parse_allocated_memresource(res_table,
+					res->data.address32.minimum,
+					res->data.address32.address_length);
+		else if (res->data.address.resource_type == 1)
+			pnpacpi_parse_allocated_ioresource(res_table,
+					res->data.address32.minimum,
+					res->data.address32.address_length);
 		break;
 	case ACPI_RESOURCE_TYPE_ADDRESS64:
-		pnpacpi_parse_allocated_memresource(res_table,
-		res->data.address64.minimum,
-		res->data.address64.address_length);
+		if (res->data.address.resource_type == 0)
+			pnpacpi_parse_allocated_memresource(res_table,
+					res->data.address64.minimum,
+					res->data.address64.address_length);
+		else if (res->data.address.resource_type == 1)
+			pnpacpi_parse_allocated_ioresource(res_table,
+					res->data.address64.minimum,
+					res->data.address64.address_length);
 		break;
 
 	case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:

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

* Re: [PATCH] pnpacpi mishandles port io ADDRESS resources
  2006-06-10 16:41 [PATCH] pnpacpi mishandles port io ADDRESS resources Matthew Wilcox
@ 2006-06-10 20:51 ` Matthieu CASTET
  2006-06-10 21:11   ` ACPI patch process problems again Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu CASTET @ 2006-06-10 20:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-acpi

Le Sat, 10 Jun 2006 10:41:50 -0600, Matthew Wilcox a écrit :

> 
> ACPI ADDRESSn resources can describe both memory and port io, but the
> current code assumes they're descibing memory, which isn't true for HP's
> ia64 systems.
> 
There already a patch for that in -mm kernel

Matthieu


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

* ACPI patch process problems again
  2006-06-10 20:51 ` Matthieu CASTET
@ 2006-06-10 21:11   ` Matthew Wilcox
  2006-06-10 21:29     ` matthieu castet
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2006-06-10 21:11 UTC (permalink / raw)
  To: Matthieu CASTET
  Cc: Len Brown, Andrew Morton, Linus Torvalds, Bjorn Helgaas,
	linux-kernel

On Sat, Jun 10, 2006 at 10:51:13PM +0200, Matthieu CASTET wrote:
> Le Sat, 10 Jun 2006 10:41:50 -0600, Matthew Wilcox a ?crit?:
> > ACPI ADDRESSn resources can describe both memory and port io, but the
> > current code assumes they're descibing memory, which isn't true for HP's
> > ia64 systems.
> > 
> There already a patch for that in -mm kernel

Yes, the original author just contacted me to tell me.  It seems to me
that we have a process problem when a bug gets fixed on March 28th,
but not propagated upstream by June 10th.  That's almost 11 weeks,
and I'm sure it'll be more by the time it's finally merged.  I thought
the days of ACPI process problems were behind us ;-(

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

* Re: ACPI patch process problems again
  2006-06-10 21:11   ` ACPI patch process problems again Matthew Wilcox
@ 2006-06-10 21:29     ` matthieu castet
  0 siblings, 0 replies; 4+ messages in thread
From: matthieu castet @ 2006-06-10 21:29 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Len Brown, Andrew Morton, Linus Torvalds, Bjorn Helgaas,
	linux-kernel

Hi,

Matthew Wilcox wrote:
> On Sat, Jun 10, 2006 at 10:51:13PM +0200, Matthieu CASTET wrote:
> 
>>Le Sat, 10 Jun 2006 10:41:50 -0600, Matthew Wilcox a ?crit?:
>>
>>>ACPI ADDRESSn resources can describe both memory and port io, but the
>>>current code assumes they're descibing memory, which isn't true for HP's
>>>ia64 systems.
>>>
>>
>>There already a patch for that in -mm kernel
> 
> 
> Yes, the original author just contacted me to tell me.  It seems to me
> that we have a process problem when a bug gets fixed on March 28th,
> but not propagated upstream by June 10th.  That's almost 11 weeks,
> and I'm sure it'll be more by the time it's finally merged.  I thought
> the days of ACPI process problems were behind us ;-(

The problem is that this patch (and your patch) introduce a regression 
for some boxes.

See http://bugzilla.kernel.org/show_bug.cgi?id=6292 for more info.

I submited today a fix for this regression.

Matthieu

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

end of thread, other threads:[~2006-06-10 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-10 16:41 [PATCH] pnpacpi mishandles port io ADDRESS resources Matthew Wilcox
2006-06-10 20:51 ` Matthieu CASTET
2006-06-10 21:11   ` ACPI patch process problems again Matthew Wilcox
2006-06-10 21:29     ` matthieu castet

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