1. 10 12月, 2009 3 次提交
  2. 03 11月, 2009 2 次提交
  3. 13 10月, 2009 2 次提交
  4. 22 9月, 2009 1 次提交
  5. 30 8月, 2009 2 次提交
  6. 29 8月, 2009 11 次提交
  7. 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
  8. 26 6月, 2009 7 次提交
  9. 24 6月, 2009 3 次提交
  10. 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
  11. 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
  12. 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
  13. 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
  14. 14 5月, 2009 3 次提交
    • C
      eeepc-laptop: unregister_rfkill_notifier on failure · bd32005e
      Corentin Chary 提交于
      If there is a failure during eeepc_hotk_add() we need
      to remove the acpi_notify_handler.
      Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      bd32005e
    • G
      eeepc-laptop: support for super hybrid engine (SHE) · 158ca1d7
      Grigori Goronzy 提交于
      The older eeepc-acpi driver allowed to control the SHE performance
      preset through a ACPI function for just this purpose. SHE underclocks
      and undervolts the FSB and undervolts the CPU (at preset 2,
      "powersave"), or slightly overclocks the CPU (at preset 0,
      "performance"). Preset 1 is the default setting with default clocks and
      voltage.
      
      The new eeepc-laptop driver doesn't support it anymore.
      The attached patch adds support for it to eeepc-laptop. It's very
      straight-forward and almost trivial.
      Signed-off-by: NGrigori Goronzy <greg@chown.ath.cx>
      Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      158ca1d7
    • A
      eeepc-laptop: Work around rfkill firmware bug · 978605c4
      Alan Jenkins 提交于
      1) Buggy firmware can change the RFKILL state by itself. This is easily
         detected.  The RFKILL API states that in such cases, we should call
         rfkill_force_state() to notify the core.
      
         I have reported the bug to Asus. I believe this is the right thing
         to do for robustness, even if this particular firmware bug is fixed.
      
      2) The same bug causes the wireless toggle key to be reported as 0x11
         instead of 0x10.  0x11 is otherwise unused, so it should be safe to
         add this as a new keycode.
      
      The bug is triggered by removing the laptop battery while hibernated.
      
      On resume, the wireless toggle key causes the firmware to toggle the
      wireless state itself.  (Also, the key is reported as 0x11 when the
      current wireless state is OFF).
      
      This is very poor behaviour because the OS can't predict whether the
      firmware is controlling the RFKILL state.
      
      Without this workaround, the bug means users have to press the wireless
      toggle key twice to enable, due to the OS/firmware conflict.  (Assuming
      rfkill-input or equivalent is being used).  The workaround avoids this.
      
      I believe that acpid scripts which toggle the value of the sysfs state file
      when the toggle key is pressed will be rendered ineffective by the bug,
      regardless of this workaround.  If they simply toggle the state, when the
      firmware has already toggled it, then you will never see a state change.
      
      Tested on "EEEPC 4G" only.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NCorentin Chary <corentincj@iksaif.net>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      978605c4