From: Matthew Wilcox <matthew@wil.cx>
To: linux-acpi@vger.kernel.org, ambx1@neo.rr.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pnpacpi mishandles port io ADDRESS resources
Date: Sat, 10 Jun 2006 10:41:50 -0600 [thread overview]
Message-ID: <20060610164150.GR1651@parisc-linux.org> (raw)
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:
next reply other threads:[~2006-06-10 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-10 16:41 Matthew Wilcox [this message]
2006-06-10 20:51 ` [PATCH] pnpacpi mishandles port io ADDRESS resources Matthieu CASTET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060610164150.GR1651@parisc-linux.org \
--to=matthew@wil.cx \
--cc=ambx1@neo.rr.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox