12 Jun, 2008

3 commits

  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • When we encode IRQ resources, we should use the "shareable" flag we got
    from _PRS rather than guessing based on the IRQ trigger mode.

    This is based on a patch by Tom Jaeger:
    http://bugzilla.kernel.org/show_bug.cgi?id=9487#c32

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • When decoding IRQ trigger mode and polarity, it is not enough to mask by
    IORESOURCE_BITS because there are now additional bits defined. For
    example, if IORESOURCE_IRQ_SHAREABLE was set, we failed to set *triggering
    and *polarity at all.

    I can't point to a failure that this patch fixes, but
    bugs in this area have caused problems when resuming after
    suspend, for example:

    http://bugzilla.kernel.org/show_bug.cgi?id=6316
    http://bugzilla.kernel.org/show_bug.cgi?id=9487
    https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/152187

    This is based on a patch by Tom Jaeger:
    http://bugzilla.kernel.org/show_bug.cgi?id=9487#c32

    [rene.herman@keyaccess.nl: fix comment]
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

06 Jun, 2008

1 commit

  • We don't need to reserve "unset" resources. Trying to reserve
    them results in messages like this, which are ugly but harmless:

    system 00:08: iomem range 0x0-0x0 could not be reserved

    Future PNP patches will remove use of IORESOURCE_UNSET, but
    we still need it for now.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

03 Jun, 2008

1 commit

  • Both the PNP/PCI conflict detection quirk and the PNP system
    driver must use the same mechanism to mark resources as disabled.

    I think it's best to keep the resource and to keep the type bit
    (IORESOURCE_MEM, etc), so that we match the list from firmware
    as closely as possible.

    Fixes this regression from 2.6.25: http://lkml.org/lkml/2008/6/1/82

    Signed-off-by: Bjorn Helgaas
    Tested-by: Avuton Olrich
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

16 May, 2008

1 commit

  • Everybody wants to pass it a function pointer, and in fact, that is what
    you _must_ pass it for it to make sense (since it knows that ia64 and
    ppc64 use descriptors for function pointers and fetches the actual
    address from there).

    So don't make the argument be a 'unsigned long' and force everybody to
    add a cast.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

15 May, 2008

4 commits

  • Add a common hex array in hexdump.c so everyone can use it.

    Add a common hi/lo helper to avoid the shifting masking that is
    done to get the upper and lower nibbles of a byte value.

    Pull the pack_hex_byte helper from kgdb as it is opencoded many
    places in the tree that will be consolidated.

    Signed-off-by: Harvey Harrison
    Acked-by: Paul Mundt
    Cc: Jason Wessel
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • The AD181x and AZT230 chips don't support an IRQ-less MPU401 option but
    work fine without one. This adds (priority functional) IRQ-less options
    for each port option to help systems with few available IRQs.

    The AD1815 quirk can't use pnp_register_irq_resource() due to doubly
    penalizing the IRQ. Also, while not a practical issue due to no IRQ
    option being present for the dependents, this needs to add in front, not
    back.

    Doesn't use pnp_register_port_resource() for symetry with above.

    This does not delete the AD1815 independent option even though it should
    be empty after the IRQ transfer due to AD1816 coming with an empty but
    still present independent option by default.

    Was tested on AD1815, AD1816 and AZT2320. The ALSA snd-ad1818a driver
    also support the AZT2002 ID for MPU401 but this doesn't as I was unable to
    test it.

    Signed-off-by: Rene Herman
    Tested-by: Uwe Bugla
    Acked-by: Uwe Bugla
    Acked-by: Bjorn Helgaas
    Cc: Takashi Iwai
    Cc: Len Brown
    Signed-off-by: Linus Torvalds

    Rene Herman
     
  • The subsequent AD181x quirk patch would like this as part of the API.
    pnp_register_dependent_option() adds to the same dependent chain the quirk is
    walking which is fairly unclean. This enables a private option chain build
    which it can then just add onto the end when done.

    Signed-off-by: Rene Herman
    Tested-by: Uwe Bugla
    Acked-by: Uwe Bugla
    Acked-by: Bjorn Helgaas
    Cc: Takashi Iwai
    Cc: Len Brown
    Signed-off-by: Linus Torvalds

    Rene Herman
     
  • Make it look a bit more like pci_fixup_device/pci_do_fixups. Also print
    the PnP ID and delete the () from the "foo+0x0/0x1234()".

    Signed-off-by: Rene Herman
    Tested-by: Uwe Bugla
    Acked-by: Uwe Bugla
    Acked-by: Bjorn Helgaas
    Cc: Takashi Iwai
    Cc: Len Brown
    Signed-off-by: Linus Torvalds

    Rene Herman
     

13 May, 2008

1 commit


01 May, 2008

4 commits

  • next-20080430/drivers/pnp/pnpbios/rsparser.c:594: warning: format '%d' expects type 'int', but argument 4 has type 'resource_size_t'
    next-20080430/drivers/pnp/pnpbios/rsparser.c:605: warning: format '%d' expects type 'int', but argument 4 has type 'resource_size_t'

    [joe@perches.com: fix it]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Randy Dunlap
    Cc: Bjorn Helgaas
    Signed-off-by: Joe Perches

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits)
    ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
    acpi: fix section mismatch warning in pnpacpi
    intel_menlo: fix build warning
    ACPI: Cleanup: Remove unneeded, multiple local dummy variables
    ACPI: video - fix permissions on some proc entries
    ACPI: video - properly handle errors when registering proc elements
    ACPI: video - do not store invalid entries in attached_array list
    ACPI: re-name acpi_pm_ops to acpi_suspend_ops
    ACER_WMI/ASUS_LAPTOP: fix build bug
    thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
    ACPI: check a return value correctly in acpi_power_get_context()
    #if 0 acpi/bay.c:eject_removable_drive()
    eeepc-laptop: add hwmon fan control
    eeepc-laptop: add backlight
    eeepc-laptop: add base driver
    ACPI: thinkpad-acpi: bump up version to 0.20
    ACPI: thinkpad-acpi: fix selects in Kconfig
    ACPI: thinkpad-acpi: use a private workqueue
    ACPI: thinkpad-acpi: fluff really minor fix
    ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
    ...

    Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
    manually.

    Linus Torvalds
     
  • Len Brown
     
  • Fix following section mismatch warning:
    WARNING: vmlinux.o(.text+0x153d69): Section mismatch in reference from the function is_exclusive_device() to the variable .init.data:excluded_id_list

    is_exclusive_device is only used from __init context so document
    this with the __init annotation and get rid of the warning.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Len Brown

    Sam Ravnborg
     

29 Apr, 2008

25 commits