1. 05 5月, 2009 1 次提交
    • M
      Bluetooth: Fix issue with sysfs handling for connections · a67e899c
      Marcel Holtmann 提交于
      Due to a semantic changes in flush_workqueue() the current approach of
      synchronizing the sysfs handling for connections doesn't work anymore. The
      whole approach is actually fully broken and based on assumptions that are
      no longer valid.
      
      With the introduction of Simple Pairing support, the creation of low-level
      ACL links got changed. This change invalidates the reason why in the past
      two independent work queues have been used for adding/removing sysfs
      devices. The adding of the actual sysfs device is now postponed until the
      host controller successfully assigns an unique handle to that link. So
      the real synchronization happens inside the controller and not the host.
      
      The only left-over problem is that some internals of the sysfs device
      handling are not initialized ahead of time. This leaves potential access
      to invalid data and can cause various NULL pointer dereferences. To fix
      this a new function makes sure that all sysfs details are initialized
      when an connection attempt is made. The actual sysfs device is only
      registered when the connection has been successfully established. To
      avoid a race condition with the registration, the check if a device is
      registered has been moved into the removal work.
      
      As an extra protection two flush_work() calls are left in place to
      make sure a previous add/del work has been completed first.
      
      Based on a report by Marc Pignat <marc.pignat@hevs.ch>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NJustin P. Mattock <justinmattock@gmail.com>
      Tested-by: NRoger Quadros <ext-roger.quadros@nokia.com>
      Tested-by: NMarc Pignat <marc.pignat@hevs.ch>
      a67e899c
  2. 29 4月, 2009 1 次提交
    • R
      Bluetooth: Ensure that HCI sysfs add/del is preempt safe · f3784d83
      Roger Quadros 提交于
      Use a different work_struct variables for add_conn() and del_conn() and
      use single work queue instead of two for adding and deleting connections.
      
      It eliminates the following error on a preemptible kernel:
      
      [  204.358032] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
      [  204.370697] pgd = c0004000
      [  204.373443] [0000000c] *pgd=00000000
      [  204.378601] Internal error: Oops: 17 [#1] PREEMPT
      [  204.383361] Modules linked in: vfat fat rfcomm sco l2cap sd_mod scsi_mod iphb pvr2d drm omaplfb ps
      [  204.438537] CPU: 0    Not tainted  (2.6.28-maemo2 #1)
      [  204.443664] PC is at klist_put+0x2c/0xb4
      [  204.447601] LR is at klist_put+0x18/0xb4
      [  204.451568] pc : [<c0270f08>]    lr : [<c0270ef4>]    psr: a0000113
      [  204.451568] sp : cf1b3f10  ip : cf1b3f10  fp : cf1b3f2c
      [  204.463104] r10: 00000000  r9 : 00000000  r8 : bf08029c
      [  204.468353] r7 : c7869200  r6 : cfbe2690  r5 : c78692c8  r4 : 00000001
      [  204.474945] r3 : 00000001  r2 : cf1b2000  r1 : 00000001  r0 : 00000000
      [  204.481506] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment kernel
      [  204.488861] Control: 10c5387d  Table: 887fc018  DAC: 00000017
      [  204.494628] Process btdelconn (pid: 515, stack limit = 0xcf1b22e0)
      Signed-off-by: NRoger Quadros <ext-roger.quadros@nokia.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f3784d83
  3. 25 3月, 2009 1 次提交
  4. 30 11月, 2008 2 次提交
    • M
      Bluetooth: Fix format arguments warning · 2e792995
      Marcel Holtmann 提交于
      Newer GCC versions are a little bit picky about how to deal with format
      arguments:
      
      net/bluetooth/hci_sysfs.c: In function ‘hci_register_sysfs’:
      net/bluetooth/hci_sysfs.c:418: warning: format not a string literal and no format arguments
      
      It is simple enough to fix and makes the compiler happy.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2e792995
    • M
      Bluetooth: Enable per-module dynamic debug messages · a418b893
      Marcel Holtmann 提交于
      With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
      allow debugging without having to recompile the kernel. This patch turns
      all BT_DBG() calls into pr_debug() to support dynamic debug messages.
      
      As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
      some broken debug entries have been fixed.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a418b893
  5. 11 11月, 2008 1 次提交
  6. 18 8月, 2008 1 次提交
    • M
      [Bluetooth] Fix userspace breakage due missing class links · 90855d7b
      Marcel Holtmann 提交于
      The Bluetooth adapters and connections are best presented via a class
      in sysfs. The removal of the links inside the Bluetooth class broke
      assumptions by userspace programs on how to find attached adapters.
      
      This patch creates adapters and connections as part of the Bluetooth
      class, but it uses different device types to distinguish them. The
      userspace programs can now easily navigate in the sysfs device tree.
      
      The unused platform device and bus have been removed to keep the
      code simple and clean.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      90855d7b
  7. 22 7月, 2008 1 次提交
  8. 15 7月, 2008 2 次提交
  9. 19 2月, 2008 2 次提交
  10. 18 2月, 2008 1 次提交
  11. 01 2月, 2008 2 次提交
  12. 23 1月, 2008 1 次提交
  13. 30 12月, 2007 1 次提交
  14. 22 10月, 2007 1 次提交
    • M
      [Bluetooth] Switch from OGF+OCF to using only opcodes · a9de9248
      Marcel Holtmann 提交于
      The Bluetooth HCI commands are divided into logical OGF groups for
      easier identification of their purposes. While this still makes sense
      for the written specification, its makes the code only more complex
      and harder to read. So instead of using separate OGF and OCF values
      to identify the commands, use a common 16-bit opcode that combines
      both values. As a side effect this also reduces the complexity of
      OGF and OCF calculations during command header parsing.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a9de9248
  15. 08 5月, 2007 1 次提交
  16. 05 5月, 2007 1 次提交
    • M
      [Bluetooth] Attach host adapters to the Bluetooth bus · 53c1d4b0
      Marcel Holtmann 提交于
      The Bluetooth host adapters are attached to the Bluetooth class and the
      low-level connections are children of these class devices. Having class
      devices as parent of bus devices breaks a lot of reasonable assumptions
      about sysfs. The host adapters should be attached to the Bluetooth bus
      to simplify the dependency resolving. For compatibility an additional
      symlink from the Bluetooth class will be used.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      53c1d4b0
  17. 09 1月, 2007 1 次提交
  18. 22 11月, 2006 2 次提交
  19. 16 10月, 2006 2 次提交
  20. 29 9月, 2006 5 次提交
  21. 04 7月, 2006 3 次提交
  22. 01 7月, 2006 1 次提交
  23. 05 1月, 2006 1 次提交
  24. 09 11月, 2005 1 次提交
  25. 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