1. 17 4月, 2013 3 次提交
    • D
      Bluetooth: hidp: add new session-management helpers · b4f34d8d
      David Herrmann 提交于
      This is a rewrite of the HIDP session management. It implements HIDP as an
      l2cap_user sub-module so we get proper notification when the underlying
      connection goes away.
      
      The helpers are not yet used but only added in this commit. The old
      session management is still used and will be removed in a following patch.
      
      The old session-management was flawed. Hotplugging is horribly broken and
      we have no way of getting notified when the underlying connection goes
      down. The whole idea of removing the HID/input sub-devices from within the
      session itself is broken and suffers from major dead-locks. We never can
      guarantee that the session can unregister itself as long as we use
      synchronous shutdowns. This can only work with asynchronous shutdowns.
      However, in this case we _must_ be able to unregister the session from the
      outside as otherwise the l2cap_conn object might be unlinked before we
      are.
      
      The new session-management is based on l2cap_user. There is only one
      way how to add a session and how to delete a session: "probe" and "remove"
      callbacks from l2cap_user.
      This guarantees that the session can be registered and unregistered at
      _any_ time without any synchronous shutdown.
      On the other hand, much work has been put into proper session-refcounting.
      We can unregister/unlink the session only if we can guarantee that it will
      stay alive. But for asynchronous shutdowns we never know when the last
      user goes away so we must use proper ref-counting.
      
      The old ->conn field has been renamed to ->hconn so we can reuse ->conn in
      the new session management. No other existing HIDP code is modified.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      b4f34d8d
    • D
      Bluetooth: hidp: move hidp_schedule() to core.c · 3764eaa9
      David Herrmann 提交于
      There is no reason to keep this helper in the header file. No other file
      depends on it so move it into hidp/core.c where it belongs.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      3764eaa9
    • D
      Bluetooth: hidp: remove unused session->state field · dcc07647
      David Herrmann 提交于
      This field is always BT_CONNECTED. Remove it and set it to BT_CONNECTED in
      hidp_copy_session() unconditionally.
      
      Also note that this field is totally bogus. Userspace can query an
      hidp-session for its state. However, whenever user-space queries us, this
      field should be BT_CONNECTED. If it wasn't BT_CONNECTED, then we would be
      currently cleaning up the session and the session itself would exit in the
      next few milliseconds. Hence, there is no reason to let user-space know
      that the session will exit now if they cannot make _any_ use of that.
      
      Thus, remove the field and let user-space think that a session is always
      BT_CONNECTED as long as they can query it.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      dcc07647
  2. 01 7月, 2011 1 次提交
    • P
      Bluetooth: Fix hidp disconnect deadlocks and lost wakeup · 7bb59df8
      Peter Hurley 提交于
      Partial revert of commit aabf6f89. When the hidp session thread
      was converted from kernel_thread to kthread, the atomic/wakeups
      were replaced with kthread_stop. kthread_stop has blocking semantics
      which are inappropriate for the hidp session kthread. In addition,
      the kthread signals itself to terminate in hidp_process_hid_control()
      - it cannot do this with kthread_stop().
      
      Lastly, a wakeup can be lost if the wakeup happens between checking
      for the loop exit condition and setting the current state to
      TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
      the task state should not be changed between the condition test and
      the yield - via schedule() - as this creates a race between the
      wakeup and resetting the state back to interruptible.)
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      7bb59df8
  3. 21 4月, 2011 1 次提交
  4. 05 4月, 2011 1 次提交
  5. 01 4月, 2011 1 次提交
  6. 11 2月, 2011 3 次提交
  7. 21 4月, 2010 1 次提交
  8. 06 2月, 2010 1 次提交
  9. 23 8月, 2009 1 次提交
  10. 15 10月, 2008 1 次提交
    • J
      HID: hid, make parsing event driven · c500c971
      Jiri Slaby 提交于
      Next step for complete hid bus, this patch includes:
      - call parser either from probe or from hid-core if there is no probe.
      - add ll_driver structure and centralize some stuff there (open, close...)
      - split and merge usb_hid_configure and hid_probe into several functions
        to allow hooks/fixes between them
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c500c971
  11. 27 2月, 2007 1 次提交
  12. 11 2月, 2007 1 次提交
  13. 10 2月, 2007 1 次提交
  14. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4