diff options
author | matthieu castet <castet.matthieu@free.fr> | 2006-08-05 15:15:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-08-06 11:57:49 -0400 |
commit | 2b8de5f50e4a302b83ebcd5b0120621336d50bd6 (patch) | |
tree | 6d7778126fb646aa9119b5850e3125dda72c2905 /drivers/pnp/pnpacpi/rsparser.c | |
parent | b4c76fa721c7c8a43655a74e508870d21d2e26d3 (diff) |
[PATCH] pnpacpi: reject ACPI_PRODUCER resources
A patch in -mm kernel correct the parsing of "address resources" of pnpacpi.
Before we assumed it was memory only, but it could be also IO.
But this change show an hidden bug : some resources could be producer type
that are not handled by pnp layer. So we should ignore the producer
resources.
This patch fixes bug 6292 (http://bugzilla.kernel.org/show_bug.cgi?id=6292).
Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as IO producer
resources.
Before correcting "address resources" parsing, it was seen as memory and was
harmless, because nobody tried to reserve this memory range as it should be
IO.
With the correction it become IO resources, and make failed all others device
that want to register IO in this range and use pnp layer (like a ISA sound
card).
The solution is to ignore producer resources
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: "Brown, Len" <len.brown@intel.com>
Acked-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 212268881857..dc79b0a0059f 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -173,6 +173,9 @@ pnpacpi_parse_allocated_address_space(struct pnp_resource_table *res_table, | |||
173 | return; | 173 | return; |
174 | } | 174 | } |
175 | 175 | ||
176 | if (p->producer_consumer == ACPI_PRODUCER) | ||
177 | return; | ||
178 | |||
176 | if (p->resource_type == ACPI_MEMORY_RANGE) | 179 | if (p->resource_type == ACPI_MEMORY_RANGE) |
177 | pnpacpi_parse_allocated_memresource(res_table, | 180 | pnpacpi_parse_allocated_memresource(res_table, |
178 | p->minimum, p->address_length); | 181 | p->minimum, p->address_length); |
@@ -252,9 +255,14 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | |||
252 | break; | 255 | break; |
253 | 256 | ||
254 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: | 257 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: |
258 | if (res->data.ext_address64.producer_consumer == ACPI_PRODUCER) | ||
259 | return AE_OK; | ||
255 | break; | 260 | break; |
256 | 261 | ||
257 | case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: | 262 | case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: |
263 | if (res->data.extended_irq.producer_consumer == ACPI_PRODUCER) | ||
264 | return AE_OK; | ||
265 | |||
258 | for (i = 0; i < res->data.extended_irq.interrupt_count; i++) { | 266 | for (i = 0; i < res->data.extended_irq.interrupt_count; i++) { |
259 | pnpacpi_parse_allocated_irqresource(res_table, | 267 | pnpacpi_parse_allocated_irqresource(res_table, |
260 | res->data.extended_irq.interrupts[i], | 268 | res->data.extended_irq.interrupts[i], |