[PATCH] pnpacpi mishandles port io ADDRESS resources

From: Matthew Wilcox
Date: Sat Jun 10 2006 - 12:40:43 EST



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@xxxxxx>

--- 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:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/