1. 02 Aug, 2009 25 commits
  2. 01 Aug, 2009 6 commits
    • Henrique de Moraes Holschuh's avatar
      thinkpad-acpi: fix incorrect use of TPACPI_BRGHT_MODE_ECNVRAM · 59fe4fe3
      Henrique de Moraes Holschuh authored
      
      
      HBRV-based default selection of backlight control strategy didn't work
      well, at least the X41 defines it but doesn't use it and I don't think
      it will stop there.
      
      Switch to a white/blacklist.  All models that have HBRV defined have
      been included in the list, and initially all ATI GPUs will get
      ECNVRAM, and the Intel GPUs will get UCMS_STEP.
      
      Symptoms of incorrect backlight mode selection are:
      
      1. Non-working backlight control through sysfs;
      
      2. Backlight gets reset to the lowest level at every shutdown, reboot
         and when thinkpad-acpi gets unloaded;
      
      This fixes a regression in 2.6.30, bugzilla #13826
      Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Reported-by: default avatarTobias Diedrich <ranma+kernel@tdiedrich.de>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      59fe4fe3
    • Michael Buesch's avatar
    • Henrique de Moraes Holschuh's avatar
      thinkpad-acpi: remove dock and bay subdrivers · 1f6fc2de
      Henrique de Moraes Holschuh authored
      
      
      The standard ACPI dock driver can handle the hotplug bays and docks of
      the ThinkPads just fine (including batteries) as of 2.6.27, and the
      code in thinkpad-acpi for the dock and bay subdrivers is currently
      broken anyway...
      
      Userspace needs some love to support the two-stage ejection nicely,
      but it is simple enough to do through udev rules (you don't even need
      HAL) so this wouldn't justify fixing the dock and bay subdrivers,
      either.
      
      That leaves warm-swap bays (_EJ3) support for thinkpad-acpi, as well
      as support for the weird dock of the model 570, but since such support
      has never left the "experimental" stage, it is also not a strong
      enough reason to find a way to fix this code.
      
      Users of ThinkPads with warm-swap bays are urged to request that _EJ3
      support be added to the regular ACPI dock driver, if such feature is
      indeed useful for them.
      Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      1f6fc2de
    • Henrique de Moraes Holschuh's avatar
      thinkpad-acpi: disable broken bay and dock subdrivers · 550e7fd8
      Henrique de Moraes Holschuh authored
      
      
      Currently, the ThinkPad-ACPI bay and dock drivers are completely
      broken, and cause a NULL pointer derreference in kernel mode (and,
      therefore, an OOPS) when they try to issue events (i.e. on dock,
      undock, bay ejection, etc).
      
      OTOH, the standard ACPI dock driver can handle the hotplug bays and
      docks of the ThinkPads just fine (including batteries) as of 2.6.27.
      In fact, it does a much better job of it than thinkpad-acpi ever did.
      
      It is just not worth the hassle to find a way to fix this crap without
      breaking the (deprecated) thinkpad-acpi dock/bay ABI.  This is old,
      deprecated code that sees little testing or use.
      
      As a quick fix suitable for -stable backports, mark the thinkpad-acpi
      bay and dock subdrivers as BROKEN in Kconfig.  The dead code will be
      removed by a later patch.
      
      This fixes bugzilla #13669, and should be applied to 2.6.27 and later.
      Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Reported-by: default avatarJoerg Platte <jplatte@naasa.net>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      550e7fd8
    • Linus Torvalds's avatar
      do_sigaltstack: small cleanups · 0dd8486b
      Linus Torvalds authored
      
      
      The previous commit ("do_sigaltstack: avoid copying 'stack_t' as a
      structure to user space") fixed a real bug.  This one just cleans up the
      copy from user space to that gcc can generate better code for it (and so
      that it looks the same as the later copy back to user space).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0dd8486b
    • Linus Torvalds's avatar
      do_sigaltstack: avoid copying 'stack_t' as a structure to user space · 0083fc2c
      Linus Torvalds authored
      
      
      Ulrich Drepper correctly points out that there is generally padding in
      the structure on 64-bit hosts, and that copying the structure from
      kernel to user space can leak information from the kernel stack in those
      padding bytes.
      
      Avoid the whole issue by just copying the three members one by one
      instead, which also means that the function also can avoid the need for
      a stack frame.  This also happens to match how we copy the new structure
      from user space, so it all even makes sense.
      
      [ The obvious solution of adding a memset() generates horrid code, gcc
        does really stupid things. ]
      Reported-by: default avatarUlrich Drepper <drepper@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0083fc2c
  3. 31 Jul, 2009 9 commits