linux/drivers/pnp
Bjorn Helgaas 36d872a370 PNPACPI: use _CRS IRQ descriptor length for _SRS
When configuring the resources of an ACPI device, we first evaluate _CRS
to get a template of resource descriptors, then fill in the specific
resource values we want, and finally evaluate _SRS to actually configure
the device.

Some resources have optional fields, so the size of encoded descriptors
varies depending on the specific values.  For example, IRQ descriptors can
be either two or three bytes long.  The third byte contains triggering
information and can be omitted if the IRQ is edge-triggered and active
high.

The BIOS often assumes that IRQ descriptors in the _SRS buffer use the
same format as those in the _CRS buffer, so this patch enforces that
constraint.

The "Start Dependent Function" descriptor also has an optional byte, but
we don't currently encode those descriptors, so I didn't do anything for
those.

I have tested this patch on a Toshiba Portege 4000.  Without the patch,
parport_pc claims the parallel port only if I use "pnpacpi=off".  This
patch makes it work with PNPACPI.

This is an extension of a patch by Tom Jaeger:
    http://bugzilla.kernel.org/show_bug.cgi?id=9487#c42

References:
    http://bugzilla.kernel.org/show_bug.cgi?id=5832 Enabling ACPI Plug and Play in kernels >2.6.9 kills Parallel support
    http://bugzilla.kernel.org/show_bug.cgi?id=9487 buggy firmware expects four-byte IRQ resource descriptor (was: Serial port disappears after Suspend on Toshiba R25)
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1d5b285da1893b90507b081664ac27f1a8a3dc5b related ACPICA fix

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-11 19:13:46 -04:00
..
isapnp
pnpacpi PNPACPI: use _CRS IRQ descriptor length for _SRS 2008-06-11 19:13:46 -04:00
pnpbios
Kconfig
Makefile
base.h pnp: add pnp_build_option() to the API 2008-05-14 19:11:13 -07:00
card.c
core.c
driver.c
interface.c
manager.c
quirks.c PNP: mark resources that conflict with PCI devices "disabled" 2008-06-02 15:59:06 -07:00
resource.c pnp: add pnp_build_option() to the API 2008-05-14 19:11:13 -07:00
support.c lib: create common ascii hex array 2008-05-14 19:11:14 -07:00
system.c PNP: skip UNSET MEM resources as well as DISABLED ones 2008-06-05 10:30:37 -07:00