PNPACPI: fix non-memory address space descriptor handling
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 28 Mar 2006 22:03:00 +0000 (17:03 -0500)
committerLen Brown <len.brown@intel.com>
Sun, 2 Apr 2006 02:24:49 +0000 (21:24 -0500)
commit1acfb7f2b0d460ee86bdb25ad0679070ec8a5f0d
tree2870bc143e40e0d7da477ff8e1b8df1a047bc52f
parent683aa4012f53b2ada0f430487e05d37b0d94e90a
PNPACPI: fix non-memory address space descriptor handling

Fix resource_type handling for QWORD, DWORD, and WORD Address Space
Descriptors.  Previously we ignored the resource_type, so I/O ports and bus
number ranges were incorrectly parsed as memory ranges.

Sample PCI root bridge resources from HP rx2600 before this patch:

    # cat /sys/bus/pnp/devices/00:02/resources
    state = active
    mem 0x0-0x1f
    mem 0x0-0x3af
    mem 0x3e0-0x1fff
    mem 0x80000000-0x8fffffff

With this patch:

    # cat /sys/bus/pnp/devices/00:02/resources
    state = active
    io 0x0-0x3af
    io 0x3e0-0x1fff
    mem 0x80000000-0x8fffffff
    mem 0x80004000000-0x80103fffffe

Changes:
    0x0-0x1f PCI bus number range was incorrectly reported as memory, now
not reported at all
    0x0-0x3af I/O port range was incorrectly reported as memory
    0x3e0-0x1fff I/O port range was incorrectly reported as memory
    0x80004000000-0x80103fffffe memory range wasn't reported at all because
we only support PNP_MAX_MEM (4) memory resources

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/pnp/pnpacpi/rsparser.c