1. 18 8月, 2012 5 次提交
    • S
      apple-gmux: Fix kconfig dependencies · f94f0f10
      Seth Forshee 提交于
      Fix the dependencies of apple-gmux to prevent it from being built-in
      when one or more of its dependencies is built as a module. Otherwise it
      can fail to build due to missing symbols.
      
      v2: Add dependency on ACPI to fix build failure when ACPI=n
      Reported-by: NArun Raghavan <arun.raghavan@collabora.co.uk>
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      f94f0f10
    • A
      asus-wmi: record wlan status while controlled by userapp · a50bd128
      AceLan Kao 提交于
      If the user bit is set, that mean BIOS can't set and record the wlan
      status, it will report the value read from id ASUS_WMI_DEVID_WLAN_LED
      (0x00010012) while we query the wlan status by id ASUS_WMI_DEVID_WLAN
      (0x00010011) through WMI.
      So, we have to record wlan status in id ASUS_WMI_DEVID_WLAN_LED
      (0x00010012) while setting the wlan status through WMI.
      This is also the behavior that windows app will do.
      
      Quote from ASUS application engineer
      ===
      When you call WMIMethod(DSTS, 0x00010011) to get WLAN status, it may return
      
      (1) 0x00050001 (On)
      (2) 0x00050000 (Off)
      (3) 0x00030001 (On)
      (4) 0x00030000 (Off)
      (5) 0x00000002 (Unknown)
      
      (1), (2) means that the model has hardware GPIO for WLAN, you can call
      WMIMethod(DEVS, 0x00010011, 1 or 0) to turn WLAN on/off.
      (3), (4) means that the model doesn’t have hardware GPIO, you need to use
      API or driver library to turn WLAN on/off, and call
      WMIMethod(DEVS, 0x00010012, 1 or 0) to set WLAN LED status.
      After you set WLAN LED status, you can see the WLAN status is changed with
      WMIMethod(DSTS, 0x00010011). Because the status is recorded lastly
      (ex: Windows), you can use it for synchronization.
      (5) means that the model doesn’t have WLAN device.
      
      WLAN is the ONLY special case with upper rule.
      
      For other device, like Bluetooth, you just need use
      WMIMethod(DSTS, 0x00010013) to get, and WMIMethod(DEVS, 0x00010013, 1 or 0)
      to set.
      ===
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      a50bd128
    • M
      apple_gmux: Fix ACPI video unregister · 9f6f955a
      Matthew Garrett 提交于
      We were only calling acpi_video_unregister() if ACPI video support was built
      in, not if it was a module.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      9f6f955a
    • M
      apple_gmux: Add support for newer hardware · 96ff7056
      Matthew Garrett 提交于
      New gmux devices have a different method for accessing the registers.
      Update the driver to cope. Incorporates feedback from Bernhard Froemel.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Cc: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
      Cc: Seth Forshee <seth.forshee@canonical.com>
      96ff7056
    • M
      gmux: Add generic write32 function · 7e30ed6b
      Matthew Garrett 提交于
      Move the special-cased backlight update function to a generic gmux_write32
      function.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Cc: Seth Forshee <seth.forshee@canonical.com>
      7e30ed6b
  2. 10 8月, 2012 1 次提交
  3. 01 8月, 2012 1 次提交
  4. 28 7月, 2012 17 次提交
    • L
      thinkpad_acpi: Free hotkey_keycode_map after unregistering tpacpi_inputdev · 00d39597
      Li Dongyang 提交于
      We should free hotkey_keycode_map after unregistering tpacpi_inputdev, to aviod
      use after free like this:
      
      [   99.408388] =============================================================================
      [   99.408393] BUG kmalloc-64 (Not tainted): Poison overwritten
      [   99.408394] -----------------------------------------------------------------------------
      [   99.408394]
      [   99.408398] INFO: 0xf2751962-0xf2751995. First byte 0x98 instead of 0x6b
      [   99.408402] INFO: Allocated in 0xfdc88c28 age=79 cpu=0 pid=1329
      [   99.408407]  __slab_alloc.isra.50.constprop.56+0x49f/0x533
      [   99.408410]  kmem_cache_alloc_trace+0x10d/0x140
      [   99.408412]  0xfdc88c28
      [   99.408414]  0xfdc898cc
      [   99.408417]  do_one_initcall+0x112/0x160
      [   99.408420]  sys_init_module+0xe6d/0x1bc0
      [   99.408422]  sysenter_do_call+0x12/0x28
      [   99.408427] INFO: Freed in hotkey_exit+0x50/0xb0 [thinkpad_acpi] age=14 cpu=1 pid=1333
      [   99.408429]  __slab_free+0x3d/0x30b
      [   99.408431]  kfree+0x129/0x140
      [   99.408435]  hotkey_exit+0x50/0xb0 [thinkpad_acpi]
      [   99.408438]  ibm_exit+0xe3/0x1a0 [thinkpad_acpi]
      [   99.408441]  thinkpad_acpi_module_exit+0x35/0x208 [thinkpad_acpi]
      [   99.408443]  sys_delete_module+0x11f/0x280
      [   99.408445]  sysenter_do_call+0x12/0x28
      [   99.408447] INFO: Slab 0xf4d5ea20 objects=17 used=17 fp=0x  (null) flags=0x40000080
      [   99.408449] INFO: Object 0xf2751960 @offset=2400 fp=0xf2751780
      [   99.408449]
      [   99.408452] Bytes b4 f2751950: 64 02 00 00 ae ce fe ff 5a 5a 5a 5a 5a 5a 5a 5a  d.......ZZZZZZZZ
      [   99.408454] Object f2751960: 6b 6b 98 00 ec 00 8e 00 ee 00 6b 6b e3 00 bf 00 kk........kk....
      [   99.408456] Object f2751970: c2 00 6b 6b 6b 6b cd 00 6b 6b 6b 6b 6b 6b e1 00 ..kkkk..kkkkkk..
      [   99.408458] Object f2751980: e0 00 e4 00 6b 6b 74 01 73 00 72 00 71 00 94 00 ....kkt.s.r.q...
      [   99.408460] Object f2751990: 6b 6b 6b 6b f8 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkk..kkkkkkkkk.
      [   99.408462] Redzone f27519a0: bb bb bb bb ....
      Signed-off-by: NLi Dongyang <Jerry87905@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      00d39597
    • L
      thinkpad_acpi: Fix a memory leak during module exit · d2be15bd
      Li Dongyang 提交于
      We should free the thinkpad_id.nummodel_str during exit as it's allocated
      in get_thinkpad_module_data().
      Signed-off-by: NLi Dongyang <Jerry87905@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      d2be15bd
    • L
      thinkpad_acpi: Flush the workqueue before freeing tpacpi_leds · e03e389d
      Li Dongyang 提交于
      We init work_struct within tpacpi_leds, and we should free tpacpi_leds after
      the workqueue is empty, in case of the work_struct is referenced after free.
      
      This script could trigger the OOPS:
      
      #!/bin/sh
      
      while true
      do
          modprobe -r thinkpad_acpi
          modprobe thinkpad_acpi
      done
      
      And the OOPS looks like this:
      
      [   73.863557] BUG: unable to handle kernel paging request at 45440000
      [   73.863925] IP: [<c1051d65>] process_one_work+0x25/0x3b0
      [   73.864749] *pde = 00000000
      [   73.865571] Oops: 0000 [#1] PREEMPT SMP
      [   73.866443] Modules linked in: thinkpad_acpi(-) nvram netconsole configfs
      aes_i586 cryptd aes_generic joydev btusb bluetooth arc4 snd_hda_codec_analog
      iwl4965 uhci_hcd pcmcia microcode iwlegacy mac80211 cfg80211 firewire_ohci
      firewire_core kvm_intel kvm snd_hda_intel acpi_cpufreq mperf ehci_hcd yenta_socket
      pcmcia_rsrc crc_itu_t sr_mod snd_hda_codec processor pcmcia_core i2c_i801 usbcore
      lpc_ich cdrom serio_raw psmouse coretemp rfkill e1000e snd_pcm snd_page_alloc
      snd_hwdep snd_timer snd pcspkr evdev ac battery thermal soundcore usb_common
      intel_agp intel_gtt tp_smapi(O) thinkpad_ec(O) ext4 crc16 jbd2 mbcache sd_mod
      ata_piix ahci libahci libata scsi_mod nouveau button video mxm_wmi wmi
      i2c_algo_bit drm_kms_helper ttm drm agpgart i2c_core [last unloaded: nvram]
       [   73.866676]
       [   73.866676] Pid: 62, comm: kworker/u:4 Tainted: G           O 3.5.0-1-ARCH
       #1 LENOVO 7662CTO/7662CTO
       [   73.866676] EIP: 0060:[<c1051d65>] EFLAGS: 00010002 CPU: 1
       [   73.866676] EIP is at process_one_work+0x25/0x3b0
       [   73.866676] EAX: 45440065 EBX: f5545090 ECX: 00000088 EDX: 45440000
       [   73.866676] ESI: f568ff40 EDI: c164dd40 EBP: f5705f98 ESP: f5705f68
       [   73.866676]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
       [   73.866676] CR0: 8005003b CR2: 45440000 CR3: 357ed000 CR4: 000007d0
       [   73.866676] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
       [   73.866676] DR6: ffff0ff0 DR7: 00000400
       [   73.866676] Process kworker/u:4 (pid: 62, ti=f5704000 task=f5700540 task.ti=f5704000)
       [   73.866676] Stack:
       [   73.866676]  f56fbf24 00000001 f5705f78 c10683e0 c1294950 00000000 00000000 f568ff40
       [   73.866676]  00000000 f568ff40 f568ff50 c164dd40 f5705fb8 c1052589 c1060c7e c15b9300
       [   73.866676]  c164dd40 00000000 f568ff40 c1052490 f5705fe4 c10570b2 00000000 f568ff40
       [   73.866676] Call Trace:
       [   73.866676]  [<c10683e0>] ? default_wake_function+0x10/0x20
       [   73.866676]  [<c1294950>] ? dev_get_drvdata+0x20/0x20
       [   73.866676]  [<c1052589>] worker_thread+0xf9/0x280
       [   73.866676]  [<c1060c7e>] ? complete+0x4e/0x60
       [   73.866676]  [<c1052490>] ? manage_workers.isra.24+0x1c0/0x1c0
       [   73.866676]  [<c10570b2>] kthread+0x72/0x80
       [   73.866676]  [<c1057040>] ? kthread_freezable_should_stop+0x50/0x50
       [   73.866676]  [<c13c20fe>] kernel_thread_helper+0x6/0x10
       [   73.866676] Code: bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 24 3e 8d 74 26
       00 89 c6 8b 02 89 d3 c7 45 f0 00 00 00 00 89 c2 30 d2 a8 04 0f 44 55 f0 <8b> 02 89 55 f0 89 da c1 ea
       0a 89 45 ec 89 d8 8b 4d ec c1 e8 04
       [   73.866676] EIP: [<c1051d65>] process_one_work+0x25/0x3b0 SS:ESP 0068:f5705f68
       [   73.866676] CR2: 0000000045440000
       [   73.866676] ---[ end trace 4d8a1887edca08c5 ]---
       [   73.866676] note: kworker/u:4[62] exited with preempt_count 1
      Signed-off-by: NLi Dongyang <Jerry87905@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      e03e389d
    • A
      dell-laptop: Add 6 machines to touchpad led quirk · 5f1e88f4
      AceLan Kao 提交于
      Add the following machines into quirk,
      Isnpiron 5420, Isnpiron 5520, Isnpiron 5720,
      Isnpiron 7420, Isnpiron 7520, Isnpiron 7720
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      5f1e88f4
    • M
      ACER: Fix Smatch double-free issue · 1bfaf1d5
      Marek Vasut 提交于
      The patch 6ae3a0876185: "ACER: Add support for accelerometer sensor"
      from Jun 1, 2012, leads to the following Smatch warning:
      drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy()
               error: don't call input_free_device() after input_unregister_device()
      
      drivers/platform/x86/acer-wmi.c
        1883  static void acer_wmi_accel_destroy(void)
        1884  {
        1885          input_unregister_device(acer_wmi_accel_dev);
        1886          input_free_device(acer_wmi_accel_dev);
        1887  }
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Fengguang Wu <wfg@linux.intel.com>
      Cc: joeyli <jlee@suse.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      1bfaf1d5
    • M
      ACER: Fix up sparse warning · 24237c43
      Marek Vasut 提交于
      drivers/platform/x86/acer-wmi.c:1836:18: sparse: Using plain integer as NULL pointer
      
      drivers/platform/x86/acer-wmi.c:1836:
        1833
        1834          BUG_ON(!name || !ah);
        1835
      > 1836          handle = 0;
        1837          status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
        1838                                          (void *)name, &handle);
        1839
      Reported-by: NFengguang Wu <wfg@linux.intel.com>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Fengguang Wu <wfg@linux.intel.com>
      Cc: joeyli <jlee@suse.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      24237c43
    • A
      asus-nb-wmi: add some video toggle keys · 3766054f
      AceLan Kao 提交于
      There are some new video switch keys that used by newer machines.
      0xA0 - SDSP HDMI only
      0xA1 - SDSP LCD + HDMI
      0xA2 - SDSP CRT + HDMI
      0xA3 - SDSP TV + HDMI
      But in Linux, there is no suitable userspace application to handle this,
      so, mapping them all to KEY_SWITCHVIDEOMODE.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      3766054f
    • A
      asus-nb-wmi: add wapf quirk for ASUS machines · d2044c5a
      AceLan Kao 提交于
      The BIOS of these machines will try to enable/disable wifi/bt in
      their own sqeuence. It won't read the enable/disable parameter
      in WMI command, but just iterates the wifi/bt's status described below
      1st. enable wifi, enable bt
      2nd. disable wifi, enable bt
      3rd. enable wifi, disable bt
      4th. disable wifi, disable bt
      That will totally mess up the rfkill status, since we will try to read
      wifi and bt's status and reset it again while booting up.
      
      To avoid this, these machines should set the wapf value to 4,
      that will let software totally control the wifi/bt's status and
      BIOS will do nothing instead of sending out the 0x88(KEY_RFKILL) event
      instead of 0x5e(wifi enable), 0x5f(wifi diable), 0x7d(bt enable), and
      0x7e(bt disable) through WMI.
      
      With this patch[1], it will handle the KEY_RFKILL event correctly and
      will block/unblock wifi and bt together.
      
      1. https://lkml.org/lkml/2012/5/21/75Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      d2044c5a
    • M
      classmate-laptop: Fix extra keys hardware id. · 0ece8d51
      Miguel Gómez 提交于
      Since ACPI devices ids were changed to use always upper-case letters, the ACPI
      id of the extra keys (FNBT0000) was not maching the one defined in the driver
      (FnBT0000), causing the extra keys not to work.
      
      The patch replaces the driver id with the one reported by ACPI, fixing the
      problem.
      Signed-off-by: NMiguel Gómez <magomez@igalia.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      0ece8d51
    • M
      classmate-laptop: Add support for Classmate V4 accelerometer. · 7125587d
      Miguel Gómez 提交于
      Classmate V4 laptop includes a new accelerometer that can't be handled by
      previous driver. This patch adds a new driver to handle it.
      
      [mjg: Fixed up the driver pm stuff]
      Signed-off-by: NMiguel Gómez <magomez@igalia.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      7125587d
    • A
      asus-wmi: enable resume on lid open · c0b91b6d
      AceLan Kao 提交于
      According to the ASUS WMI spec., to enable resume on lid open should
      use the device ID(0x00120032), but it doesn't work indeed.
      
      After discussing with ASUS' BIOS engineer, they say wake on lid open
      doesn't have a uniq device ID(0x00120032) in the BIOS. It shares the same
      device ID with deep S3(0x00120031), and the deep S3(resume on lid open)
      is disable by default.
      
      Adding this option in asus wmi sysfs
         /sys/devices/platform/<platform>/lid_resume
      so that userspace apps can enable/disable this feature by themselves.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      c0b91b6d
    • A
      asus-wmi: control backlight power through WMI, not ACPI · 272c77d5
      AceLan Kao 提交于
      BugLink: https://bugs.launchpad.net/bugs/1000146
      
      Some h/w that can adjust screen brightness through ACPI functions, but
      can't turn on/off the backlight power correctly. So, we list those h/w in
      quirks and try to turn on/off the backlight power through WMI.
      Signed-off-by: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      272c77d5
    • C
      samsung-laptop: support R40/R41 · e052067d
      Corentin Chary 提交于
      > Chassis Information
      > 	Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
      >	Type: Other
      
      Type should be "Notebook", "Laptop", .. not "Other".
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      e052067d
    • C
      09d5677c
    • C
      drivers-platform-x86: use acpi_video_dmi_promote_vendor() · a60b2176
      Corentin Chary 提交于
      Instead of using directly acpi_video_unregister(), use
      acpi_video_dmi_promote_vendor() (and make it call
      acpi_video_unregister() if needed)
      Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      a60b2176
    • M
      ACER: Add support for accelerometer sensor · 1eb3fe1d
      Marek Vasut 提交于
      This device is present on Iconia Tab W500.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: joeyli <jlee@suse.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      1eb3fe1d
    • A
      asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID. · 63a78bb1
      Alex Hung 提交于
      According to responses from the BIOS team, ASUS_WMI_METHODID_DSTS2
      (0x53545344) will be used as future DSTS ID. In addition, calling
      asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS2, 0, 0, NULL) returns
      ASUS_WMI_UNSUPPORTED_METHOD in new ASUS laptop PCs. This patch fixes
      no DSTS ID will be assigned in this case.
      Signed-off-by: NAlex Hung <alex.hung@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Cc: stable@kernel.org
      63a78bb1
  5. 25 7月, 2012 1 次提交
  6. 07 7月, 2012 1 次提交
  7. 04 7月, 2012 1 次提交
  8. 01 7月, 2012 13 次提交