public inbox for linux-acpi@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; 2+ 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] 2+ messages in thread

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

Thread overview: 2+ 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

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