1. 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
  2. 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
  3. 18 4月, 2009 5 次提交
  4. 04 4月, 2009 11 次提交
  5. 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
  6. 30 3月, 2009 1 次提交
  7. 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
  8. 16 1月, 2009 12 次提交
  9. 19 12月, 2008 1 次提交
    • L
      create drivers/platform/x86/ from drivers/misc/ · 41b16dce
      Len Brown 提交于
      Move x86 platform specific drivers from drivers/misc/
      to a new home under drivers/platform/x86/.
      
      The community has been maintaining x86 vendor-specific
      platform specific drivers under /drivers/misc/ for a few years.
      The oldest ones started life under drivers/acpi.
      They moved out of drivers/acpi/ because they don't actually
      implement the ACPI specification, but either simply
      use ACPI, or implement vendor-specific ACPI extensions.
      
      In the future we anticipate...
      drivers/misc/ will go away.
      other architectures will create drivers/platform/<arch>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      41b16dce
  10. 27 11月, 2008 1 次提交
    • H
      ACPI: thinkpad-acpi: fix fan sleep/resume path · 0081b162
      Henrique de Moraes Holschuh 提交于
      This fixes a regression from v2.6.27, caused by commit
      5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi:
      attempt to preserve fan state on resume".
      
      It is possible for fan_suspend() to fail to properly initialize
      fan_control_desired_level as required by fan_resume(), resulting on
      the fan always being set to level 7 on resume if the user didn't
      touch the fan controller.
      
      In order to get fan sleep/resume handling to work right:
      
      1. Fix the fan_suspend handling of the T43 firmware quirk. If it is
      still undefined, we didn't touch the fan yet and that means we have no
      business doing it on resume.
      
      2. Store the fan level on its own variable to avoid any possible
      issues with hijacking fan_control_desired_level (which isn't supposed
      to have anything other than 0-7 in it, anyway).
      
      3. Change the fan_resume code to me more straightforward to understand
      (although we DO optimize the boolean logic there, otherwise it looks
      disgusting).
      
      4. Add comments to help understand what the code is supposed to be
      doing.
      
      5. Change fan_set_level to be less strict about how auto and
      full-speed modes are requested.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=11982Signed-off-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Reported-by: NTino Keitel <tino.keitel@tikei.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0081b162
  11. 08 11月, 2008 1 次提交
  12. 23 10月, 2008 4 次提交