1. 30 8月, 2009 2 次提交
  2. 29 8月, 2009 11 次提交
  3. 03 8月, 2009 1 次提交
    • A
      eeepc-laptop: fix hot-unplug on resume · 7334546a
      Alan Jenkins 提交于
      OOPS on resume when the wireless adaptor is disabled during suspend was
      introduced by "eeepc-laptop: read rfkill soft-blocked state on resume".
      
      Unable to handle kernel NULL pointer dereference
      
      Process s2disk
      Tainted: G W
      IP: klist_put
      
      Call trace:
      ? klist_del
      ? device_del
      ? device_unregister
      ? pci_stop_dev
      ? pci_stop_bus
      ? pci_remove_device
      ? eeepc_rfkill_hotplug [eeepc_laptop]
      ? eeepc_hotk_resume [eeepc_laptop]
      ? acpi_device_resume
      ? device_resume
      ? hibernation_snapshot
      
      It appears the PCI device is removed twice.  The eeepc_rfkill_hotplug()
      call from the resume handler is racing against the call from the ACPI
      notifier callback.  The ACPI notification is triggered by the resume
      handler when it refreshes the value of CM_ASL_WLAN.
      
      The fix is to serialize hotplug calls using a workqueue.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=13825Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7334546a
  4. 26 6月, 2009 7 次提交
  5. 24 6月, 2009 3 次提交
  6. 19 6月, 2009 2 次提交
    • A
      eeepc-laptop: read rfkill soft-blocked state on resume · 96e9cfeb
      Alan Jenkins 提交于
      This will respect state changes over hibernation, e.g. if the user
      disables the wireless in the BIOS setup screen.
      
      It reveals an issue where ACPI silently kills the wireless on
      suspend.  Normally, the BIOS restores the correct state from
      non-volatile storage on boot.  But when hibernation is aborted,
      the wireless would remain killed.  Fortunately we can work around
      this in the resume handler by simply writing back the same value we
      read from NVS.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      96e9cfeb
    • A
      rfkill: don't restore software blocked state on persistent devices · 06d5caf4
      Alan Jenkins 提交于
      The setting of the "persistent" flag is also made more explicit using
      a new rfkill_init_sw_state() function, instead of special-casing
      rfkill_set_sw_state() when it is called before registration.
      
      Suspend is a bit of a corner case so we try to get away without adding
      another hack to rfkill-input - it's going to be removed soon.
      If the state does change over suspend, users will simply have to prod
      rfkill-input twice in order to toggle the state.
      
      Userspace policy agents will be able to implement a more consistent user
      experience.  For example, they can avoid the above problem if they
      toggle devices individually.  Then there would be no "global state"
      to get out of sync.
      
      Currently there are only two rfkill drivers with persistent soft-blocked
      state.  thinkpad-acpi already checks the software state on resume.
      eeepc-laptop will require modification.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      CC: Marcel Holtmann <marcel@holtmann.org>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      06d5caf4
  7. 18 6月, 2009 1 次提交
    • B
      ACPI: eeepc-laptop: use .notify method instead of installing handler directly · d9b9bd7b
      Bjorn Helgaas 提交于
      This patch adds a .notify() method.  The presence of .notify() causes
      Linux/ACPI to manage event handlers and notify handlers on our behalf,
      so we don't have to install and remove them ourselves.
      
      This driver relies on seeing system notify events, not device-specific
      ones (because it used ACPI_SYSTEM_NOTIFY).  We use the
      ACPI_DRIVER_ALL_NOTIFY_EVENTS driver flag to request all events, then
      just ignore any device events we get.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      CC: Corentin Chary <corentincj@iksaif.net>
      CC: acpi4asus-user@lists.sourceforge.net
      CC: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d9b9bd7b
  8. 11 6月, 2009 1 次提交
    • A
      rfkill: remove set_global_sw_state · b3fa1329
      Alan Jenkins 提交于
      rfkill_set_global_sw_state() (previously rfkill_set_default()) will no
      longer be exported by the rewritten rfkill core.
      
      Instead, platform drivers which can provide persistent soft-rfkill state
      across power-down/reboot should indicate their initial state by calling
      rfkill_set_sw_state() before registration.  Otherwise, they will be
      initialized to a default value during registration by a set_block call.
      
      We remove existing calls to rfkill_set_sw_state() which happen before
      registration, since these had no effect in the old model.  If these
      drivers do have persistent state, the calls can be put back (subject
      to testing :-).  This affects hp-wmi and acer-wmi.
      
      Drivers with persistent state will affect the global state only if
      rfkill-input is enabled.  This is required, otherwise booting with
      wireless soft-blocked and pressing the wireless-toggle key once would
      have no apparent effect.  This special case will be removed in future
      along with rfkill-input, in favour of a more flexible userspace daemon
      (see Documentation/feature-removal-schedule.txt).
      
      Now rfkill_global_states[n].def is only used to preserve global states
      over EPO, it is renamed to ".sav".
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b3fa1329
  9. 04 6月, 2009 1 次提交
    • J
      rfkill: rewrite · 19d337df
      Johannes Berg 提交于
      This patch completely rewrites the rfkill core to address
      the following deficiencies:
      
       * all rfkill drivers need to implement polling where necessary
         rather than having one central implementation
      
       * updating the rfkill state cannot be done from arbitrary
         contexts, forcing drivers to use schedule_work and requiring
         lots of code
      
       * rfkill drivers need to keep track of soft/hard blocked
         internally -- the core should do this
      
       * the rfkill API has many unexpected quirks, for example being
         asymmetric wrt. alloc/free and register/unregister
      
       * rfkill can call back into a driver from within a function the
         driver called -- this is prone to deadlocks and generally
         should be avoided
      
       * rfkill-input pointlessly is a separate module
      
       * drivers need to #ifdef rfkill functions (unless they want to
         depend on or select RFKILL) -- rfkill should provide inlines
         that do nothing if it isn't compiled in
      
       * the rfkill structure is not opaque -- drivers need to initialise
         it correctly (lots of sanity checking code required) -- instead
         force drivers to pass the right variables to rfkill_alloc()
      
       * the documentation is hard to read because it always assumes the
         reader is completely clueless and contains way TOO MANY CAPS
      
       * the rfkill code needlessly uses a lot of locks and atomic
         operations in locked sections
      
       * fix LED trigger to actually change the LED when the radio state
         changes -- this wasn't done before
      Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19d337df
  10. 14 5月, 2009 5 次提交
  11. 16 3月, 2009 1 次提交
  12. 07 2月, 2009 1 次提交
    • D
      eeepc-laptop: fix oops when changing backlight brightness during eeepc-laptop init · 7695fb04
      Darren Salt 提交于
      I got the following oops while changing the backlight brightness during
      startup.  When it happens, it prevents use of the hotkeys, Fn-Fx, and the
      lid button.
      
      It's a clear use-before-init, as I verified by testing with an
      appropriately-placed "else printk".
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000
      *pde = 00000000
      Oops: 0002 [#1] PREEMPT SMP
      Pid: 160, comm: kacpi_notify Not tainted (2.6.28.1-eee901 #4) 901
      EIP: 0060:[<c0264e68>]  [<c0264e68>] eeepc_hotk_notify+26/da
      EFLAGS: 00010246 CPU: 1
      Using defaults from ksymoops -t elf32-i386 -a i386
      EAX: 00000009 EBX: 00000000 ECX: 00000009 EDX: f70dbf64
      ESI: 00000029 EDI: f7335188 EBP: c02112c9 ESP: f70dbf80
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
       f70731e0 f73acd50 c02164ac f7335180 f70aa040 c02112e6 f733518c c012b62f
       f70aa044 f70aa040 c012bdba f70aa04c 00000000 c012be6e 00000000 f70bdf80
       c012e198 f70dbfc4 f70dbfc4 f70aa040 c012bdba 00000000 c012e0c9 c012e091
      Call Trace:
       [<c02164ac>] ? acpi_ev_notify_dispatch+4c/55
       [<c02112e6>] ? acpi_os_execute_deferred+1d/25
       [<c012b62f>] ? run_workqueue+71/f1
       [<c012bdba>] ? worker_thread+0/bf
       [<c012be6e>] ? worker_thread+b4/bf
       [<c012e198>] ? autoremove_wake_function+0/2b
       [<c012bdba>] ? worker_thread+0/bf
       [<c012e0c9>] ? kthread+38/5f
       [<c012e091>] ? kthread+0/5f
       [<c0103abf>] ? kernel_thread_helper+7/10
      Code: 00 00 00 00 c3 83 3d 60 5c 50 c0 00 56 89 d6 53 0f 84 c4 00 00 00 8d 42
      e0 83 f8 0f 77 0f 8b 1d 68 5c 50 c0 89 d8 e8 a9 fa ff ff <89> 03 8b 1d 60 5c
      50 c0 89 f2 83 e2 7f 0f b7 4c 53 10 8d 41 01
      Signed-off-by: NDarren Salt <linux@youmustbejoking.demon.co.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7695fb04
  13. 21 1月, 2009 4 次提交