1. 19 9月, 2009 3 次提交
  2. 02 8月, 2009 3 次提交
  3. 19 6月, 2009 1 次提交
    • 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
  4. 18 6月, 2009 7 次提交
  5. 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
  6. 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
  7. 18 4月, 2009 5 次提交
  8. 04 4月, 2009 11 次提交
  9. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  10. 30 3月, 2009 1 次提交
  11. 16 3月, 2009 1 次提交
    • M
      thinkpad-acpi: fix module autoloading for older models · b36a50f9
      Mathieu Chouquet-Stringer 提交于
      Looking at the source, there seems to be a missing * to match my DMI
      string.  I mean for newer IBM and Lenovo's laptops you match either one
      of the following:
      MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*");
      MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*");
      
      While for older Thinkpads, you do this (for instance):
      IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]");
      
      with IBM_BIOS_MODULE_ALIAS being MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW")
      
      Note there's no * terminating the string.  As result, udev doesn't load
      anything because modprobe cannot find anything matching this (my
      machine actually):
      
      udevtest: run: '/sbin/modprobe dmi:bvnIBM:bvr1IET71WW(2.10):bd06/16/2006:svnIBM:pn236621U:pvrNotAv
      Signed-off-by: NMathieu Chouquet-Stringer <mchouque@free.fr>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b36a50f9
  12. 16 1月, 2009 5 次提交