1. 18 5月, 2010 1 次提交
  2. 10 5月, 2010 3 次提交
  3. 27 2月, 2010 2 次提交
  4. 04 12月, 2009 2 次提交
  5. 23 8月, 2009 1 次提交
  6. 08 6月, 2009 1 次提交
  7. 27 2月, 2009 1 次提交
  8. 30 11月, 2008 3 次提交
    • 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
    • M
      Bluetooth: Send HCI Reset command by default on device initialization · 7a9d4020
      Marcel Holtmann 提交于
      The Bluetooth subsystem was not using the HCI Reset command when doing
      device initialization. The Bluetooth 1.0b specification was ambiguous
      on how the device firmware was suppose to handle it. Almost every device
      was triggering a transport reset at the same time. In case of USB this
      ended up in disconnects from the bus.
      
      All modern Bluetooth dongles handle this perfectly fine and a lot of
      them actually require that HCI Reset is sent. If not then they are
      either stuck in their HID Proxy mode or their internal structures for
      inquiry and paging are not correctly setup.
      
      To handle old and new devices smoothly the Bluetooth subsystem contains
      a quirk to force the HCI Reset on initialization. However maintaining
      such a quirk becomes more and more complicated. This patch turns the
      logic around and lets the old devices disable the HCI Reset command.
      
      The only device where the HCI_QUIRK_NO_RESET is still needed are the
      original Digianswer devices and dongles with an early CSR firmware.
      
      CSR reported that they fixed this for version 12 firmware. The last
      official release of version 11 firmware is build ID 115. The first
      version 12 candidate was build ID 117.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7a9d4020
    • V
      Bluetooth: Fix leak of uninitialized data to userspace · c6bf514c
      Vegard Nossum 提交于
          struct hci_dev_list_req {
                  __u16  dev_num;
                  struct hci_dev_req dev_req[0];  /* hci_dev_req structures */
          };
      
      sizeof(struct hci_dev_list_req) == 4, so the two bytes immediately
      following "dev_num" will never be initialized. When this structure
      is copied to userspace, these uninitialized bytes are leaked.
      
      Fix by using kzalloc() instead of kmalloc(). Found using kmemcheck.
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c6bf514c
  9. 12 9月, 2008 1 次提交
    • M
      [Bluetooth] Fix regression from using default link policy · 7c6a329e
      Marcel Holtmann 提交于
      To speed up the Simple Pairing connection setup, the support for the
      default link policy has been enabled. This is in contrast to settings
      the link policy on every connection setup. Using the default link policy
      is the preferred way since there is no need to dynamically change it for
      every connection.
      
      For backward compatibility reason and to support old userspace the
      HCISETLINKPOL ioctl has been switched over to using hci_request() to
      issue the HCI command for setting the default link policy instead of
      just storing it in the HCI device structure.
      
      However the hci_request() can only be issued when the device is
      brought up. If used on a device that is registered, but still down
      it will timeout and fail. This is problematic since the command is
      put on the TX queue and the Bluetooth core tries to submit it to
      hardware that is not ready yet. The timeout for these requests is
      10 seconds and this causes a significant regression when setting up
      a new device.
      
      The userspace can perfectly handle a failure of the HCISETLINKPOL
      ioctl and will re-submit it later, but the 10 seconds delay causes
      a problem. So in case hci_request() is called on a device that is
      still down, just fail it with ENETDOWN to indicate what happens.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7c6a329e
  10. 15 7月, 2008 2 次提交
    • M
      [Bluetooth] Use ACL config stage to retrieve remote features · 769be974
      Marcel Holtmann 提交于
      The Bluetooth technology introduces new features on a regular basis
      and for some of them it is important that the hardware on both sides
      support them. For features like Simple Pairing it is important that
      the host stacks on both sides have switched this feature on. To make
      valid decisions, a config stage during ACL link establishment has been
      introduced that retrieves remote features and if needed also the remote
      extended features (known as remote host features) before signalling
      this link as connected.
      
      This change introduces full reference counting of incoming and outgoing
      ACL links and the Bluetooth core will disconnect both if no owner of it
      is present. To better handle interoperability during the pairing phase
      the disconnect timeout for incoming connections has been increased to
      10 seconds. This is five times more than for outgoing connections.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      769be974
    • M
      [Bluetooth] Make use of the default link policy settings · e4e8e37c
      Marcel Holtmann 提交于
      The Bluetooth specification supports the default link policy settings
      on a per host controller basis. For every new connection the link
      manager would then use these settings. It is better to use this instead
      of bothering the controller on every connection setup to overwrite the
      default settings.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e4e8e37c
  11. 06 3月, 2008 1 次提交
    • D
      bluetooth: hci_core: defer hci_unregister_sysfs() · 147e2d59
      Dave Young 提交于
      Alon Bar-Lev reports:
      
       Feb 16 23:41:33 alon1 usb 3-1: configuration #1 chosen from 1 choice
      Feb 16 23:41:33 alon1 BUG: unable to handle kernel NULL pointer  
      dereference at virtual address 00000008
      Feb 16 23:41:33 alon1 printing eip: c01b2db6 *pde = 00000000
      Feb 16 23:41:33 alon1 Oops: 0000 [#1] PREEMPT
      Feb 16 23:41:33 alon1 Modules linked in: ppp_deflate zlib_deflate  
      zlib_inflate bsd_comp ppp_async rfcomm l2cap hci_usb vmnet(P)  
      vmmon(P) tun radeon drm autofs4 ipv6 aes_generic crypto_algapi  
      ieee80211_crypt_ccmp nf_nat_irc nf_nat_ftp nf_conntrack_irc  
      nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT  
      xt_tcpudp ipt_LOG xt_limit xt_state nf_conntrack_ipv4 nf_conntrack  
      iptable_filter ip_tables x_tables snd_pcm_oss snd_mixer_oss  
      snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device  
      bluetooth ppp_generic slhc ioatdma dca cfq_iosched cpufreq_powersave  
      cpufreq_ondemand cpufreq_conservative acpi_cpufreq freq_table uinput  
      fan af_packet nls_cp1255 nls_iso8859_1 nls_utf8 nls_base pcmcia  
      snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm nsc_ircc snd_timer  
      ipw2200 thinkpad_acpi irda snd ehci_hcd yenta_socket uhci_hcd  
      psmouse ieee80211 soundcore intel_agp hwmon rsrc_nonstatic pcspkr  
      e1000 crc_ccitt snd_page_alloc i2c_i801 ieee80211_crypt pcmcia_core  
      agpgart thermal bat!
      tery nvram rtc sr_mod ac sg firmware_class button processor cdrom  
      unix usbcore evdev ext3 jbd ext2 mbcache loop ata_piix libata sd_mod  
      scsi_mod
      Feb 16 23:41:33 alon1
      Feb 16 23:41:33 alon1 Pid: 4, comm: events/0 Tainted: P         
      (2.6.24-gentoo-r2 #1)
      Feb 16 23:41:33 alon1 EIP: 0060:[<c01b2db6>] EFLAGS: 00010282 CPU: 0
      Feb 16 23:41:33 alon1 EIP is at sysfs_get_dentry+0x26/0x80
      Feb 16 23:41:33 alon1 EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX:  
      f48a2210
      Feb 16 23:41:33 alon1 ESI: f72eb900 EDI: f4803ae0 EBP: f4803ae0 ESP:  
      f7c49efc
      Feb 16 23:41:33 alon1 hcid[7004]: HCI dev 0 registered
      Feb 16 23:41:33 alon1 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      Feb 16 23:41:33 alon1 Process events/0 (pid: 4, ti=f7c48000  
      task=f7c3efc0 task.ti=f7c48000)
      Feb 16 23:41:33 alon1 Stack: f7cb6140 f4822668 f7e71e10 c01b304d  
      ffffffff ffffffff fffffffe c030ba9c
      Feb 16 23:41:33 alon1 f7cb6140 f4822668 f6da6720 f7cb6140 f4822668  
      f6da6720 c030ba8e c01ce20b
      Feb 16 23:41:33 alon1 f6e9dd00 c030ba8e f6da6720 f6e9dd00 f6e9dd00  
      00000000 f4822600 00000000
      Feb 16 23:41:33 alon1 Call Trace:
      Feb 16 23:41:33 alon1 [<c01b304d>] sysfs_move_dir+0x3d/0x1f0
      Feb 16 23:41:33 alon1 [<c01ce20b>] kobject_move+0x9b/0x120
      Feb 16 23:41:33 alon1 [<c0241711>] device_move+0x51/0x110
      Feb 16 23:41:33 alon1 [<f9aaed80>] del_conn+0x0/0x70 [bluetooth]
      Feb 16 23:41:33 alon1 [<f9aaed99>] del_conn+0x19/0x70 [bluetooth]
      Feb 16 23:41:33 alon1 [<c012c1a1>] run_workqueue+0x81/0x140
      Feb 16 23:41:33 alon1 [<c02c0c88>] schedule+0x168/0x2e0
      Feb 16 23:41:33 alon1 [<c012fc70>] autoremove_wake_function+0x0/0x50
      Feb 16 23:41:33 alon1 [<c012c9cb>] worker_thread+0x9b/0xf0
      Feb 16 23:41:33 alon1 [<c012fc70>] autoremove_wake_function+0x0/0x50
      Feb 16 23:41:33 alon1 [<c012c930>] worker_thread+0x0/0xf0
      Feb 16 23:41:33 alon1 [<c012f962>] kthread+0x42/0x70
      Feb 16 23:41:33 alon1 [<c012f920>] kthread+0x0/0x70
      Feb 16 23:41:33 alon1 [<c0104c2f>] kernel_thread_helper+0x7/0x18
      Feb 16 23:41:33 alon1 =======================
      Feb 16 23:41:33 alon1 Code: 26 00 00 00 00 57 89 c7 a1 50 1b 3a c0  
      56 53 8b 70 38 85 f6 74 08 8b 0e 85 c9 74 58 ff 06 8b 56 50 39 fa 74  
      47 89 fb eb 02 89 c3 <8b> 43 08 39 c2 75 f7 8b 46 08 83 c0 68 e8 98  
      e7 10 00 8b 43 10
      Feb 16 23:41:33 alon1 EIP: [<c01b2db6>] sysfs_get_dentry+0x26/0x80  
      SS:ESP 0068:f7c49efc
      Feb 16 23:41:33 alon1 ---[ end trace aae864e9592acc1d ]---
      
      Defer hci_unregister_sysfs because hci device could be destructed
      while hci conn devices still there.
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Tested-by: NStefan Seyfried <seife@suse.de>
      Acked-by: NAlon Bar-Lev <alon.barlev@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      147e2d59
  12. 18 2月, 2008 1 次提交
  13. 22 10月, 2007 2 次提交
    • M
      [Bluetooth] Add support for handling simple eSCO links · b6a0dc82
      Marcel Holtmann 提交于
      With the Bluetooth 1.2 specification the Extended SCO feature for
      better audio connections was introduced. So far the Bluetooth core
      wasn't able to handle any eSCO connections correctly. This patch
      adds simple eSCO support while keeping backward compatibility with
      older devices.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b6a0dc82
    • 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
  14. 09 9月, 2007 1 次提交
  15. 19 7月, 2007 1 次提交
  16. 11 7月, 2007 2 次提交
  17. 26 4月, 2007 4 次提交
  18. 11 2月, 2007 1 次提交
  19. 29 9月, 2006 1 次提交
  20. 13 7月, 2006 1 次提交
  21. 04 7月, 2006 2 次提交
  22. 01 7月, 2006 1 次提交
  23. 28 3月, 2006 1 次提交
    • A
      [PATCH] Notifier chain update: API changes · e041c683
      Alan Stern 提交于
      The kernel's implementation of notifier chains is unsafe.  There is no
      protection against entries being added to or removed from a chain while the
      chain is in use.  The issues were discussed in this thread:
      
          http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
      
      We noticed that notifier chains in the kernel fall into two basic usage
      classes:
      
      	"Blocking" chains are always called from a process context
      	and the callout routines are allowed to sleep;
      
      	"Atomic" chains can be called from an atomic context and
      	the callout routines are not allowed to sleep.
      
      We decided to codify this distinction and make it part of the API.  Therefore
      this set of patches introduces three new, parallel APIs: one for blocking
      notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
      really just the old API under a new name).  New kinds of data structures are
      used for the heads of the chains, and new routines are defined for
      registration, unregistration, and calling a chain.  The three APIs are
      explained in include/linux/notifier.h and their implementation is in
      kernel/sys.c.
      
      With atomic and blocking chains, the implementation guarantees that the chain
      links will not be corrupted and that chain callers will not get messed up by
      entries being added or removed.  For raw chains the implementation provides no
      guarantees at all; users of this API must provide their own protections.  (The
      idea was that situations may come up where the assumptions of the atomic and
      blocking APIs are not appropriate, so it should be possible for users to
      handle these things in their own way.)
      
      There are some limitations, which should not be too hard to live with.  For
      atomic/blocking chains, registration and unregistration must always be done in
      a process context since the chain is protected by a mutex/rwsem.  Also, a
      callout routine for a non-raw chain must not try to register or unregister
      entries on its own chain.  (This did happen in a couple of places and the code
      had to be changed to avoid it.)
      
      Since atomic chains may be called from within an NMI handler, they cannot use
      spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
      entirely in the unregister routine, which is okay since unregistration is much
      less frequent that calling a chain.
      
      Here is the list of chains that we adjusted and their classifications.  None
      of them use the raw API, so for the moment it is only a placeholder.
      
        ATOMIC CHAINS
        -------------
      arch/i386/kernel/traps.c:		i386die_chain
      arch/ia64/kernel/traps.c:		ia64die_chain
      arch/powerpc/kernel/traps.c:		powerpc_die_chain
      arch/sparc64/kernel/traps.c:		sparc64die_chain
      arch/x86_64/kernel/traps.c:		die_chain
      drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
      kernel/panic.c:				panic_notifier_list
      kernel/profile.c:			task_free_notifier
      net/bluetooth/hci_core.c:		hci_notifier
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
      net/ipv6/addrconf.c:			inet6addr_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
      net/netlink/af_netlink.c:		netlink_chain
      
        BLOCKING CHAINS
        ---------------
      arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
      arch/s390/kernel/process.c:		idle_chain
      arch/x86_64/kernel/process.c		idle_notifier
      drivers/base/memory.c:			memory_chain
      drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
      drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
      drivers/macintosh/adb.c:		adb_client_list
      drivers/macintosh/via-pmu.c		sleep_notifier_list
      drivers/macintosh/via-pmu68k.c		sleep_notifier_list
      drivers/macintosh/windfarm_core.c	wf_client_list
      drivers/usb/core/notify.c		usb_notifier_list
      drivers/video/fbmem.c			fb_notifier_list
      kernel/cpu.c				cpu_chain
      kernel/module.c				module_notify_list
      kernel/profile.c			munmap_notifier
      kernel/profile.c			task_exit_notifier
      kernel/sys.c				reboot_notifier_list
      net/core/dev.c				netdev_chain
      net/decnet/dn_dev.c:			dnaddr_chain
      net/ipv4/devinet.c:			inetaddr_chain
      
      It's possible that some of these classifications are wrong.  If they are,
      please let us know or submit a patch to fix them.  Note that any chain that
      gets called very frequently should be atomic, because the rwsem read-locking
      used for blocking chains is very likely to incur cache misses on SMP systems.
      (However, if the chain's callout routines may sleep then the chain cannot be
      atomic.)
      
      The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
      material written by Keith Owens and suggestions from Paul McKenney and Andrew
      Morton.
      
      [jes@sgi.com: restructure the notifier chain initialization macros]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e041c683
  24. 09 11月, 2005 1 次提交
  25. 29 10月, 2005 1 次提交
  26. 30 8月, 2005 2 次提交