1. 05 9月, 2012 3 次提交
  2. 22 8月, 2012 1 次提交
  3. 16 8月, 2012 1 次提交
    • S
      HID: picolcd: using vmalloc() requires the include of vmalloc.h · d1c60a03
      Stephen Rothwell 提交于
      Fixes thes build errors:
      
      drivers/hid/hid-picolcd_fb.c: In function 'picolcd_fb_destroy':
      drivers/hid/hid-picolcd_fb.c:350:2: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
      drivers/hid/hid-picolcd_fb.c: In function 'picolcd_init_framebuffer':
      drivers/hid/hid-picolcd_fb.c:508:2: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
      drivers/hid/hid-picolcd_fb.c:508:12: warning: assignment makes pointer from integer without a cast [enabled by default]
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d1c60a03
  4. 15 8月, 2012 5 次提交
    • B
      HID: picoLCD: Improve unplug handling · a93ab849
      Bruno Prémont 提交于
      Stop earlier attempting to submit new reports/URBs (though locking and
      usbhid still prevents to bail out early enough to not produce multiple
        hid-picolcd 0003:04D8:C002.0003: usb_submit_urb(out) failed: -19
      messages in kernel log.
      
      Strengthen framebuffer removal to be less racy.
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a93ab849
    • B
      HID: picoLCD: satify some checkpatch warnings · baacf9c5
      Bruno Prémont 提交于
      WARNING: static const char * array should probably be static const char * const
      +static const char *error_codes[] = {
      
      WARNING: min() should probably be min_t(size_t, 20, s)
      +       raw_data[2] = min((size_t)20, s);
      
      Note: the second min_t suggestion cannot be followed because GCC is not
      smart enough to track constants through it and make
      copy_from_user_overflow() check happy.
      
      WARNING: min() should probably be min_t(u8, 20, raw_data[2])
      +       if (copy_from_user(raw_data+3, u, min((u8)20, raw_data[2])))
                      return -EFAULT;
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      baacf9c5
    • B
      HID: picoLCD: prevent NULL pointer dereference on unplug · b07072e6
      Bruno Prémont 提交于
      [  679.807480] BUG: unable to handle kernel NULL pointer dereference at 00000074
      [  679.814457] IP: [<de93b5bf>] picolcd_led_set_brightness+0x1f/0xb0 [hid_picolcd]
      [  679.814457] *pde = 00000000
      [  679.814457] Oops: 0000 [#1]
      [  679.814457] Modules linked in: hid_picolcd fb_sys_fops sysimgblt sysfillrect syscopyarea drm_kms_helper nfs lockd nfs_acl sunrpc [last unloaded: hid_picolcd]
      [  679.814457]
      [  679.814457] Pid: 272, comm: khubd Not tainted 3.5.0-jupiter-00006-g463a4c0 #1 NVIDIA Corporation. nFORCE-MCP/MS-6373
      [  679.814457] EIP: 0060:[<de93b5bf>] EFLAGS: 00010246 CPU: 0
      [  679.814457] EIP is at picolcd_led_set_brightness+0x1f/0xb0 [hid_picolcd]
      [  679.814457] EAX: 00000000 EBX: d9f0c4e0 ECX: 00000000 EDX: 00000000
      [  679.814457] ESI: 00000000 EDI: dd6b79c0 EBP: dd4f7d90 ESP: dd4f7d80
      [  679.814457]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
      [  679.814457] CR0: 8005003b CR2: 00000074 CR3: 1d74e000 CR4: 000007d0
      [  679.814457] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
      [  679.814457] DR6: ffff0ff0 DR7: 00000400
      [  679.814457] Process khubd (pid: 272, ti=dd4f6000 task=dd442470 task.ti=dd4f6000)
      [  679.814457] Stack:
      [  679.814457]  1d6c3300 d9f0c4e0 d9f0c4e0 dd6b79c0 dd4f7da0 c132912a 00000000 d9f0c4e0
      [  679.814457]  dd4f7dac c132935d 00000000 dd4f7dc0 de93b847 dd6b79c0 00000282 c700ecc8
      [  679.814457]  dd4f7ddc de93924f 00000004 c700ecc8 c700e060 c700ecbc c15ee300 dd4f7dec
      [  679.814457] Call Trace:
      [  679.814457]  [<c132912a>] led_brightness_set+0x2a/0x30
      [  679.814457]  [<c132935d>] led_classdev_unregister+0xd/0x50
      [  679.814457]  [<de93b847>] picolcd_exit_leds+0x27/0x40 [hid_picolcd]
      [  679.814457]  [<de93924f>] picolcd_remove+0xbf/0x110 [hid_picolcd]
      [  679.814457]  [<c132c5dd>] hid_device_remove+0x3d/0x80
      [  679.814457]  [<c1294126>] __device_release_driver+0x56/0xa0
      [  679.814457]  [<c1294190>] device_release_driver+0x20/0x30
      [  679.814457]  [<c1293bbf>] bus_remove_device+0x9f/0xc0
      [  679.814457]  [<c1291a1d>] device_del+0xdd/0x150
      [  679.814457]  [<c132c205>] hid_destroy_device+0x25/0x60
      [  679.814457]  [<c13368cb>] usbhid_disconnect+0x1b/0x40
      [  679.814457]  [<c12f4976>] usb_unbind_interface+0x46/0x170
      [  679.814457]  [<c1294126>] __device_release_driver+0x56/0xa0
      [  679.814457]  [<c1294190>] device_release_driver+0x20/0x30
      [  679.814457]  [<c1293bbf>] bus_remove_device+0x9f/0xc0
      [  679.814457]  [<c1291a1d>] device_del+0xdd/0x150
      [  679.814457]  [<c12f2975>] usb_disable_device+0x85/0x1a0
      [  679.814457]  [<c1053146>] ? __cond_resched+0x16/0x30
      [  679.814457]  [<c12ebdb0>] usb_disconnect+0x80/0xf0
      [  679.814457]  [<c12ed61f>] hub_thread+0x3df/0x1030
      [  679.814457]  [<c10484a0>] ? wake_up_bit+0x30/0x30
      [  679.814457]  [<c12ed240>] ? usb_remote_wakeup+0x40/0x40
      [  679.814457]  [<c1047f94>] kthread+0x74/0x80
      [  679.814457]  [<c1047f20>] ? flush_kthread_worker+0x90/0x90
      [  679.814457]  [<c140e33e>] kernel_thread_helper+0x6/0xd
      [  679.814457] Code: e0 25 00 e0 ff ff ff 48 14 eb 99 90 55 89 e5 83 ec 10 89 5d f4 89 75 f8 89 c3 89 7d fc 8b 40 1c 89 d6 8b 00 e8 13 89 95 e2 31 c9 <39> 5c 88 74 74 13 41 83 f9 08 75 f4 8b 5d f4 8b 75 f8 8b 7d fc
      [  679.814457] EIP: [<de93b5bf>] picolcd_led_set_brightness+0x1f/0xb0 [hid_picolcd] SS:ESP 0068:dd4f7d80
      [  679.814457] CR2: 0000000000000074
      [  680.116438] ---[ end trace 6f0d9d63bff280ff ]---
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b07072e6
    • B
      9966c37c
    • B
      HID: picoLCD: split driver code · fabdbf2f
      Bruno Prémont 提交于
      In order to make code maintenance easier, split the vairous
      functions into individial files (this removes a bunch of #ifdefs).
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      fabdbf2f
  5. 23 7月, 2012 1 次提交
  6. 22 7月, 2012 1 次提交
  7. 20 7月, 2012 11 次提交
    • D
      HID: Allow drivers to be their own listener · 4bc19f62
      David Herrmann 提交于
      hid-picolcd and hid-wiimote do not allow any of hidinput, hiddev or hidraw
      to claim the device but still want to remain on the bus. Hence, if a
      driver uses the raw_event callback but no other listener claimed the
      device, we still leave it on the bus as the driver handles everything by
      itself. It thus becomes its own listener.
      
      Under some circumstances (eg., hidinput_connect() fails and raw_event set)
      a device may be left on the bus even though it requires external
      listeners. But then if hidinput_connect() fails there are bigger issues
      than a device that is left unhandled. So we can safely use this heuristic
      to avoid adding another flag for special devices like hid-picolcd and
      hid-wiimote.
      
      This also removes the ugly hack from hid-picolcd as this is no longer
      required.
      Signed-off-by: NDavid Herrmann <dh.herrmann@googlemail.com>
      Acked-by: NHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4bc19f62
    • A
      HID: usbhid: fix error paths in suspend · eb055fd0
      Alan Stern 提交于
      This patch (as1597) fixes some of the error paths in usbhid's suspend
      routine.  The driver was not careful to restart everything that might
      have been stopped, in cases where a suspend failed.
      
      For example, once the HID_SUSPENDED flag is set, an output report
      submission would not restart the corresponding URB queue.  If a
      suspend fails, it's therefore necessary to check whether the queues
      need to be restarted.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      eb055fd0
    • A
      HID: usbhid: check for suspend or reset before restarting · d4150c8f
      Alan Stern 提交于
      This patch (as1596) improves the queue-restart logic in usbhid by
      checking to see if the device is suspended or a reset is about to
      occur.  There's no point submitting an URB if either of those is
      true.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d4150c8f
    • A
      HID: usbhid: replace HID_REPORTED_IDLE with HID_SUSPENDED · f2b5264d
      Alan Stern 提交于
      This patch (as1595) improves the usbhid driver by using the
      HID_SUSPENDED bitflag to indicate that the device is suspended rather
      than using HID_REPORTED_IDLE, which the patch removes.
      
      Since HID_SUSPENDED was not being used for anything, and since the
      name "HID_REPORTED_IDLE" doesn't convey much meaning, the end result
      is easier to read and understand.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f2b5264d
    • A
      HID: usbhid: inline some simple routines · 93101af3
      Alan Stern 提交于
      This patch (as1594) simplifies the usbhid driver by inlining a couple
      of routines.  As a result of an earlier patch, irq_out_pump_restart()
      and ctrl_pump_restart() are each used in only one place.  Since they
      don't really do what their names say, and since they each involve only
      about two lines of actual code, there's no reason to keep them as
      separate functions.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      93101af3
    • A
      HID: usbhid: fix autosuspend calls · 01a7c984
      Alan Stern 提交于
      This patch (as1593) fixes some logic errors in the usbhid driver
      relating to runtime PM.  The driver does not balance its calls to
      usb_autopm_get_interface_async() and usb_autopm_put_interface_async().
      
      For example, when the control queue is restarted the driver does a
      _get.  But the resume won't happen immediately, so the driver leaves
      the queue stopped.  When the resume does occur, the queue is restarted
      and a second _get occurs, with no balancing _put.
      
      The patch fixes the problem by rearranging the logic for restarting
      the queues.  All the _get/_put calls and bitflag settings in
      __usbhid_submit_report() are moved into the queue-restart routines.  A
      balancing _put call is added for the case where the queue is still
      suspended.  A call to irq_out_pump_restart(), which doesn't take all
      the right actions for restarting the irq-OUT queue, is replaced by a
      call to usbhid_restart_out_queue(), which does.  Similarly for
      ctrl_pump_restart().
      
      Finally, new code is added to prevent an autosuspend from happening
      every time an URB is cancelled, and the comments explaining what
      happens when an URB needs to be cancelled are expanded and clarified.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      01a7c984
    • A
      HID: usbhid: fix use-after-free bug · 668160e5
      Alan Stern 提交于
      This patch (as1592) fixes an obscure problem in the usbhid driver.
      Under some circumstances, a control or interrupt-OUT URB can be
      submitted twice.  This will happen if the first submission fails; the
      queue pointers aren't updated, so the next time the queue is restarted
      the same URB will be submitted again.
      
      The problem is that raw_report gets deallocated during the first
      submission.  The second submission will then dereference and try to
      free an already-freed region of memory.  The patch fixes the problem
      by setting raw_report to NULL when it is deallocated and checking for
      NULL before dereferencing it.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      668160e5
    • M
      HID: hid-core: optimize in case of hidraw · b94e3c94
      Matthieu CASTET 提交于
      When using hidraw, hid buffer can be big and take lot's of
      time to process (interrupt) kernel context.
      Don't try to parse report if we are only interrested in hidraw.
      
      Also don't prepare data for debug stuff if no debugfs file
      are opened.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b94e3c94
    • M
      HID: hidraw: fix list->buffer memleak · 4c7b417e
      Matthieu CASTET 提交于
      If we don't read fast enough hidraw device, hidraw_report_event
      will cycle and we will leak list->buffer.
      Also list->buffer are not free on release.
      After this patch, kmemleak report nothing.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4c7b417e
    • V
      HID: uhid: Fix sending events with invalid data · adefb69b
      Vinicius Costa Gomes 提交于
      This was detected because events with invalid types were arriving
      to userspace.
      
      The code before this patch would only work for the first event in the
      queue (when uhid->tail is 0).
      Signed-off-by: NVinicius Costa Gomes <vinicius.gomes@openbossa.org>
      Reviewed-by: NDavid Herrmann <dh.herrmann@googlemail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      adefb69b
    • S
      HID: roccat: added sensor sysfs attribute for Savu · 11a5c818
      Stefan Achatz 提交于
      The sensor attr can be used to tweak the optical sensor of the Savu.
      Signed-off-by: NStefan Achatz <erazor_de@users.sourceforge.net>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      11a5c818
  8. 19 7月, 2012 1 次提交
  9. 12 7月, 2012 1 次提交
  10. 11 7月, 2012 2 次提交
  11. 09 7月, 2012 2 次提交
  12. 05 7月, 2012 2 次提交
  13. 04 7月, 2012 1 次提交
  14. 28 6月, 2012 6 次提交
  15. 25 6月, 2012 2 次提交