1. 05 3月, 2012 1 次提交
    • N
      HID: hid-input: allow array fields out of range · 883e0e36
      Nikolai Kondrashov 提交于
      Allow array field values out of range as per HID 1.11 specification,
      section 6.2.25:
      
      	Rather than returning a single bit for each button in the group, an
      	array returns an index in each field that corresponds to the pressed
      	button (like keyboard scan codes). An out-of range value in and array
      	field is considered no controls asserted.
      
      Apparently, "and" above is a typo and should be "an".
      
      This fixes at least Waltop tablet pen clicks - otherwise BTN_TOUCH is never
      released.
      
      The relevant part of Waltop tablet report descriptors is this:
      
      	0x09, 0x42,         /*          Usage (Tip Switch),         */
      	0x09, 0x44,         /*          Usage (Barrel Switch),      */
      	0x09, 0x46,         /*          Usage (Tablet Pick),        */
      	0x15, 0x01,         /*          Logical Minimum (1),        */
      	0x25, 0x03,         /*          Logical Maximum (3),        */
      	0x75, 0x04,         /*          Report Size (4),            */
      	0x95, 0x01,         /*          Report Count (1),           */
      	0x80,               /*          Input,                      */
      
      This is a regression fix for commit b4b583d4 ("HID: be more strict when
      ignoring out-of-range fields").
      Signed-off-by: NNikolai Kondrashov <spbnick@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      883e0e36
  2. 28 2月, 2012 1 次提交
  3. 07 2月, 2012 1 次提交
  4. 06 2月, 2012 1 次提交
  5. 04 2月, 2012 3 次提交
  6. 03 2月, 2012 3 次提交
    • I
      Input: i8042 - add Lenovo Ideapad U455 to 'reset' blacklist · 82b982c9
      Igor Murzov 提交于
      From 2d5a38a56453421e82428155f4b00303f3fb19b2 Mon Sep 17 00:00:00 2001
      From: Igor Murzov <e-mail@date.by>
      Date: Wed, 1 Feb 2012 03:11:53 +0400
      Subject: [PATCH] Input: i8042 - add Lenovo Ideapad U455 to 'reset' blacklist
      
      Lenovo Ideapad U455 needs to be in the reset quirk list for its
      touchpad's proper function.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=40672Signed-off-by: NIgor Murzov <e-mail@date.by>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      82b982c9
    • A
      rbd: fix safety of rbd_put_client() · d23a4b3f
      Alex Elder 提交于
      The rbd_client structure uses a kref to arrange for cleaning up and
      freeing an instance when its last reference is dropped.  The cleanup
      routine is rbd_client_release(), and one of the things it does is
      delete the rbd_client from rbd_client_list.  It acquires node_lock
      to do so, but the way it is done is still not safe.
      
      The problem is that when attempting to reuse an existing rbd_client,
      the structure found might already be in the process of getting
      destroyed and cleaned up.
      
      Here's the scenario, with "CLIENT" representing an existing
      rbd_client that's involved in the race:
      
       Thread on CPU A                | Thread on CPU B
       ---------------                | ---------------
       rbd_put_client(CLIENT)         | rbd_get_client()
         kref_put()                   |   (acquires node_lock)
           kref->refcount becomes 0   |   __rbd_client_find() returns CLIENT
           calls rbd_client_release() |   kref_get(&CLIENT->kref);
                                      |   (releases node_lock)
             (acquires node_lock)     |
             deletes CLIENT from list | ...and starts using CLIENT...
             (releases node_lock)     |
             and frees CLIENT         | <-- but CLIENT gets freed here
      
      Fix this by having rbd_put_client() acquire node_lock.  The result
      could still be improved, but at least it avoids this problem.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      d23a4b3f
    • A
      rbd: fix a memory leak in rbd_get_client() · 97bb59a0
      Alex Elder 提交于
      If an existing rbd client is found to be suitable for use in
      rbd_get_client(), the rbd_options structure is not being
      freed as it should.  Fix that.
      Signed-off-by: NAlex Elder <elder@dreamhost.com>
      Signed-off-by: NSage Weil <sage@newdream.net>
      97bb59a0
  7. 02 2月, 2012 11 次提交
    • I
      drm/radeon/kms/blit: fix blit copy for very large buffers · 52b53a0b
      Ilija Hadzic 提交于
      Evergreen and NI blit copy was broken if the buffer maps to a rectangle
      whose one dimension is 16384 (max dimension allowed by these chips).
      In the mainline kernel, the problem is exposed only when buffers are
      very large (1G), but it's still a problem. The problem could be exposed
      for smaller buffers if anyone modifies the algorithm for rectangle
      construction in r600_blit_create_rect() (the reason why someone would
      modify that algorithm is to tune the performance of buffer moves).
      
      The root cause was in i2f() function which only operated on range between
      0 and 16383. Fix this by extending the range of i2f() function to 0 to
      32767.
      
      While at it improve the function so that the range can be easily
      extended in the future (if it becomes necessary), cleanup lines
      over 80 characters, and replace in-line comments with one strategic
      comment that explains the crux of the function.
      
      Credits to michel@daenzer.net for pointing out the root cause of
      the bug.
      
      v2: Fix I2F_MAX_INPUT constant definition goof and warn only once
          if input argument is out of range. Edit the comment a little
          bit to avoid some linguistic confusion and make it look better
          in general.
      Signed-off-by: NIlija Hadzic <ihadzic@research.bell-labs.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NMichel Dänzer <michel@daenzer.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      52b53a0b
    • A
      drm/radeon/kms: fix TRAVIS panel setup · 304a4840
      Alex Deucher 提交于
      Different versions of the DP to LVDS bridge chip
      need different panel mode settings depending on
      the chip version used.
      
      Fixes:
      https://bugs.freedesktop.org/show_bug.cgi?id=41569Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      304a4840
    • D
      drm/radeon: fix use after free in ATRM bios reading code. · de47a9cd
      Dave Airlie 提交于
      Fixes:
      https://bugs.freedesktop.org/show_bug.cgi?id=45503
      
      Reported-and-Debugged-by: mlambda@gmail.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      de47a9cd
    • K
      HID: hyperv: Properly disconnect the input device · c1c454b8
      K. Y. Srinivasan 提交于
      When we unload the mouse driver, properly disconnect the input device.
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Reported-by: NFuzhou Chen <fuzhouch@microsoft.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c1c454b8
    • M
      HID: usbhid: fix dead lock between open and disconect · ba18311d
      Ming Lei 提交于
      There is no reason to hold hiddev->existancelock before
      calling usb_deregister_dev, so move it out of the lock.
      
      The patch fixes the lockdep warning below.
      
      [ 5733.386271] ======================================================
      [ 5733.386274] [ INFO: possible circular locking dependency detected ]
      [ 5733.386278] 3.2.0-custom-next-20120111+ #1 Not tainted
      [ 5733.386281] -------------------------------------------------------
      [ 5733.386284] khubd/186 is trying to acquire lock:
      [ 5733.386288]  (minor_rwsem){++++.+}, at: [<ffffffffa0011a04>] usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386311]
      [ 5733.386312] but task is already holding lock:
      [ 5733.386315]  (&hiddev->existancelock){+.+...}, at: [<ffffffffa0094d17>] hiddev_disconnect+0x26/0x87 [usbhid]
      [ 5733.386328]
      [ 5733.386329] which lock already depends on the new lock.
      [ 5733.386330]
      [ 5733.386333]
      [ 5733.386334] the existing dependency chain (in reverse order) is:
      [ 5733.386336]
      [ 5733.386337] -> #1 (&hiddev->existancelock){+.+...}:
      [ 5733.386346]        [<ffffffff81082d26>] lock_acquire+0xcb/0x10e
      [ 5733.386357]        [<ffffffff813df961>] __mutex_lock_common+0x60/0x465
      [ 5733.386366]        [<ffffffff813dfe4d>] mutex_lock_nested+0x36/0x3b
      [ 5733.386371]        [<ffffffffa0094ad6>] hiddev_open+0x113/0x193 [usbhid]
      [ 5733.386378]        [<ffffffffa0011971>] usb_open+0x66/0xc2 [usbcore]
      [ 5733.386390]        [<ffffffff8111a8b5>] chrdev_open+0x12b/0x154
      [ 5733.386402]        [<ffffffff811159a8>] __dentry_open.isra.16+0x20b/0x355
      [ 5733.386408]        [<ffffffff811165dc>] nameidata_to_filp+0x43/0x4a
      [ 5733.386413]        [<ffffffff81122ed5>] do_last+0x536/0x570
      [ 5733.386419]        [<ffffffff8112300b>] path_openat+0xce/0x301
      [ 5733.386423]        [<ffffffff81123327>] do_filp_open+0x33/0x81
      [ 5733.386427]        [<ffffffff8111664d>] do_sys_open+0x6a/0xfc
      [ 5733.386431]        [<ffffffff811166fb>] sys_open+0x1c/0x1e
      [ 5733.386434]        [<ffffffff813e7c79>] system_call_fastpath+0x16/0x1b
      [ 5733.386441]
      [ 5733.386441] -> #0 (minor_rwsem){++++.+}:
      [ 5733.386448]        [<ffffffff8108255d>] __lock_acquire+0xa80/0xd74
      [ 5733.386454]        [<ffffffff81082d26>] lock_acquire+0xcb/0x10e
      [ 5733.386458]        [<ffffffff813e01f5>] down_write+0x44/0x77
      [ 5733.386464]        [<ffffffffa0011a04>] usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386475]        [<ffffffffa0094d2d>] hiddev_disconnect+0x3c/0x87 [usbhid]
      [ 5733.386483]        [<ffffffff8132df51>] hid_disconnect+0x3f/0x54
      [ 5733.386491]        [<ffffffff8132dfb4>] hid_device_remove+0x4e/0x7a
      [ 5733.386496]        [<ffffffff812c0957>] __device_release_driver+0x81/0xcd
      [ 5733.386502]        [<ffffffff812c09c3>] device_release_driver+0x20/0x2d
      [ 5733.386507]        [<ffffffff812c0564>] bus_remove_device+0x114/0x128
      [ 5733.386512]        [<ffffffff812bdd6f>] device_del+0x131/0x183
      [ 5733.386519]        [<ffffffff8132def3>] hid_destroy_device+0x1e/0x3d
      [ 5733.386525]        [<ffffffffa00916b0>] usbhid_disconnect+0x36/0x42 [usbhid]
      [ 5733.386530]        [<ffffffffa000fb60>] usb_unbind_interface+0x57/0x11f [usbcore]
      [ 5733.386542]        [<ffffffff812c0957>] __device_release_driver+0x81/0xcd
      [ 5733.386547]        [<ffffffff812c09c3>] device_release_driver+0x20/0x2d
      [ 5733.386552]        [<ffffffff812c0564>] bus_remove_device+0x114/0x128
      [ 5733.386557]        [<ffffffff812bdd6f>] device_del+0x131/0x183
      [ 5733.386562]        [<ffffffffa000de61>] usb_disable_device+0xa8/0x1d8 [usbcore]
      [ 5733.386573]        [<ffffffffa0006bd2>] usb_disconnect+0xab/0x11f [usbcore]
      [ 5733.386583]        [<ffffffffa0008aa0>] hub_thread+0x73b/0x1157 [usbcore]
      [ 5733.386593]        [<ffffffff8105dc0f>] kthread+0x95/0x9d
      [ 5733.386601]        [<ffffffff813e90b4>] kernel_thread_helper+0x4/0x10
      [ 5733.386607]
      [ 5733.386608] other info that might help us debug this:
      [ 5733.386609]
      [ 5733.386612]  Possible unsafe locking scenario:
      [ 5733.386613]
      [ 5733.386615]        CPU0                    CPU1
      [ 5733.386618]        ----                    ----
      [ 5733.386620]   lock(&hiddev->existancelock);
      [ 5733.386625]                                lock(minor_rwsem);
      [ 5733.386630]                                lock(&hiddev->existancelock);
      [ 5733.386635]   lock(minor_rwsem);
      [ 5733.386639]
      [ 5733.386640]  *** DEADLOCK ***
      [ 5733.386641]
      [ 5733.386644] 6 locks held by khubd/186:
      [ 5733.386646]  #0:  (&__lockdep_no_validate__){......}, at: [<ffffffffa00084af>] hub_thread+0x14a/0x1157 [usbcore]
      [ 5733.386661]  #1:  (&__lockdep_no_validate__){......}, at: [<ffffffffa0006b77>] usb_disconnect+0x50/0x11f [usbcore]
      [ 5733.386677]  #2:  (hcd->bandwidth_mutex){+.+.+.}, at: [<ffffffffa0006bc8>] usb_disconnect+0xa1/0x11f [usbcore]
      [ 5733.386693]  #3:  (&__lockdep_no_validate__){......}, at: [<ffffffff812c09bb>] device_release_driver+0x18/0x2d
      [ 5733.386704]  #4:  (&__lockdep_no_validate__){......}, at: [<ffffffff812c09bb>] device_release_driver+0x18/0x2d
      [ 5733.386714]  #5:  (&hiddev->existancelock){+.+...}, at: [<ffffffffa0094d17>] hiddev_disconnect+0x26/0x87 [usbhid]
      [ 5733.386727]
      [ 5733.386727] stack backtrace:
      [ 5733.386731] Pid: 186, comm: khubd Not tainted 3.2.0-custom-next-20120111+ #1
      [ 5733.386734] Call Trace:
      [ 5733.386741]  [<ffffffff81062881>] ? up+0x34/0x3b
      [ 5733.386747]  [<ffffffff813d9ef3>] print_circular_bug+0x1f8/0x209
      [ 5733.386752]  [<ffffffff8108255d>] __lock_acquire+0xa80/0xd74
      [ 5733.386756]  [<ffffffff810808b4>] ? trace_hardirqs_on_caller+0x15d/0x1a3
      [ 5733.386763]  [<ffffffff81043a3f>] ? vprintk+0x3f4/0x419
      [ 5733.386774]  [<ffffffffa0011a04>] ? usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386779]  [<ffffffff81082d26>] lock_acquire+0xcb/0x10e
      [ 5733.386789]  [<ffffffffa0011a04>] ? usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386797]  [<ffffffff813e01f5>] down_write+0x44/0x77
      [ 5733.386807]  [<ffffffffa0011a04>] ? usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386818]  [<ffffffffa0011a04>] usb_deregister_dev+0x37/0x9e [usbcore]
      [ 5733.386825]  [<ffffffffa0094d2d>] hiddev_disconnect+0x3c/0x87 [usbhid]
      [ 5733.386830]  [<ffffffff8132df51>] hid_disconnect+0x3f/0x54
      [ 5733.386834]  [<ffffffff8132dfb4>] hid_device_remove+0x4e/0x7a
      [ 5733.386839]  [<ffffffff812c0957>] __device_release_driver+0x81/0xcd
      [ 5733.386844]  [<ffffffff812c09c3>] device_release_driver+0x20/0x2d
      [ 5733.386848]  [<ffffffff812c0564>] bus_remove_device+0x114/0x128
      [ 5733.386854]  [<ffffffff812bdd6f>] device_del+0x131/0x183
      [ 5733.386859]  [<ffffffff8132def3>] hid_destroy_device+0x1e/0x3d
      [ 5733.386865]  [<ffffffffa00916b0>] usbhid_disconnect+0x36/0x42 [usbhid]
      [ 5733.386876]  [<ffffffffa000fb60>] usb_unbind_interface+0x57/0x11f [usbcore]
      [ 5733.386882]  [<ffffffff812c0957>] __device_release_driver+0x81/0xcd
      [ 5733.386886]  [<ffffffff812c09c3>] device_release_driver+0x20/0x2d
      [ 5733.386890]  [<ffffffff812c0564>] bus_remove_device+0x114/0x128
      [ 5733.386895]  [<ffffffff812bdd6f>] device_del+0x131/0x183
      [ 5733.386905]  [<ffffffffa000de61>] usb_disable_device+0xa8/0x1d8 [usbcore]
      [ 5733.386916]  [<ffffffffa0006bd2>] usb_disconnect+0xab/0x11f [usbcore]
      [ 5733.386921]  [<ffffffff813dff82>] ? __mutex_unlock_slowpath+0x130/0x141
      [ 5733.386929]  [<ffffffffa0008aa0>] hub_thread+0x73b/0x1157 [usbcore]
      [ 5733.386935]  [<ffffffff8106a51d>] ? finish_task_switch+0x78/0x150
      [ 5733.386941]  [<ffffffff8105e396>] ? __init_waitqueue_head+0x4c/0x4c
      [ 5733.386950]  [<ffffffffa0008365>] ? usb_remote_wakeup+0x56/0x56 [usbcore]
      [ 5733.386955]  [<ffffffff8105dc0f>] kthread+0x95/0x9d
      [ 5733.386961]  [<ffffffff813e90b4>] kernel_thread_helper+0x4/0x10
      [ 5733.386966]  [<ffffffff813e24b8>] ? retint_restore_args+0x13/0x13
      [ 5733.386970]  [<ffffffff8105db7a>] ? __init_kthread_worker+0x55/0x55
      [ 5733.386974]  [<ffffffff813e90b0>] ? gs_change+0x13/0x13
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ba18311d
    • P
      i.MX SDMA: Fix burstsize settings · 94ac27a5
      Philippe Rétornaz 提交于
      Commit 6584cb88 (ARM i.MX dma: Fix burstsize settings) fixed
      the mxcmmc driver but forgot to fix the SDMA driver to handle the
      correct burtsize.
      This make the SD card access works again with DMA on i.MX31 boards.
      Signed-off-by: NPhilippe Rétornaz <philippe.retornaz@epfl.ch>
      Tested-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      94ac27a5
    • R
      staging: fix go7007-usb license · da46d7dd
      Randy Dunlap 提交于
      Add MODULE_LICENSE() as per the license in the comment at the top of the
      file for this source module to fix build warning:
      
        WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/media/go7007/go7007-usb.o
        see include/linux/module.h for more information
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Ross Cohen <rcohen@snurgle.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      da46d7dd
    • C
      Input: serio_raw - return proper result when serio_raw_read fails · 7a0a27d2
      Che-Liang Chiou 提交于
      serio_raw_read now returns (sometimes partially) successful number of
      bytes transferred to the caller, and only returns error code to the
      caller on completely failed transfers.
      Signed-off-by: NChe-Liang Chiou <clchiou@chromium.org>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      7a0a27d2
    • F
      Input: twl4030_keypad - fix comment (trivial) · 4936f97c
      Felipe Contreras 提交于
      And trivial whitespace fixes.
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      4936f97c
    • H
      Input: evdev - fix variable initialisation · 42f57874
      Heiko Stübner 提交于
      Commit 509f87c5 (evdev - do not block waiting for an event if fd
      is nonblock) created a code path were it was possible to use retval
      uninitialized.
      
      This could lead to the xorg evdev input driver getting corrupt data
      and refusing to work with log messages like
      	AUO-Pixcir touchscreen: Read error: Success
      	sg060_keys: Read error: Success
      	AUO-Pixcir touchscreen: Read error: Success
      	sg060_keys: Read error: Success
      (for drivers auo-pixcir-ts and gpio-keys).
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Acked-by: NDima Zavin <dima@android.com>
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      42f57874
    • G
      dma: sh_dma: not all SH DMAC implementations support MEMCPY · e9c8d7a0
      Guennadi Liakhovetski 提交于
      Add a flag to allow platforms to specify, whether a DMAC instance supports
      the MEMCPY operation. To avoid regressions, preserve the current default.
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      e9c8d7a0
  8. 01 2月, 2012 8 次提交
  9. 31 1月, 2012 4 次提交
  10. 30 1月, 2012 7 次提交