1. 11 9月, 2018 1 次提交
    • H
      Bluetooth: hci_ldisc: Free rw_semaphore on close · e6a57d22
      Hermes Zhang 提交于
      The percpu_rw_semaphore is not currently freed, and this leads to
      a crash when the stale rcu callback is invoked.  DEBUG_OBJECTS
      detects this.
      
       ODEBUG: free active (active state 1) object type: rcu_head hint: (null)
       ------------[ cut here ]------------
       WARNING: CPU: 1 PID: 2024 at debug_print_object+0xac/0xc8
       PC is at debug_print_object+0xac/0xc8
       LR is at debug_print_object+0xac/0xc8
       Call trace:
       [<ffffff80082e2c2c>] debug_print_object+0xac/0xc8
       [<ffffff80082e40b0>] debug_check_no_obj_freed+0x1e8/0x228
       [<ffffff8008191254>] kfree+0x1cc/0x250
       [<ffffff80083cc03c>] hci_uart_tty_close+0x54/0x108
       [<ffffff800832e118>] tty_ldisc_close.isra.1+0x40/0x58
       [<ffffff800832e14c>] tty_ldisc_kill+0x1c/0x40
       [<ffffff800832e3dc>] tty_ldisc_release+0x94/0x170
       [<ffffff8008325554>] tty_release_struct+0x1c/0x58
       [<ffffff8008326400>] tty_release+0x3b0/0x490
       [<ffffff80081a3fe8>] __fput+0x88/0x1d0
       [<ffffff80081a418c>] ____fput+0xc/0x18
       [<ffffff80080c0624>] task_work_run+0x9c/0xc0
       [<ffffff80080a9e24>] do_exit+0x24c/0x8a0
       [<ffffff80080aa4e0>] do_group_exit+0x38/0xa0
       [<ffffff80080aa558>] __wake_up_parent+0x0/0x28
       [<ffffff8008082c00>] el0_svc_naked+0x34/0x38
       ---[ end trace bfe08cbd89098cdf ]---
      Signed-off-by: NHermes Zhang <chenhuiz@axis.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e6a57d22
  2. 21 8月, 2018 2 次提交
  3. 13 8月, 2018 1 次提交
  4. 10 8月, 2018 1 次提交
  5. 08 8月, 2018 1 次提交
  6. 07 8月, 2018 1 次提交
  7. 05 8月, 2018 1 次提交
  8. 03 8月, 2018 18 次提交
  9. 24 7月, 2018 7 次提交
  10. 06 7月, 2018 2 次提交
    • S
      Bluetooth: btusb: use irqsave() in URB's complete callback · a5e50d5b
      Sebastian Andrzej Siewior 提交于
      The USB completion callback does not disable interrupts while acquiring
      the ->lock. We want to remove the local_irq_disable() invocation from
      __usb_hcd_giveback_urb() and therefore it is required for the callback
      handler to disable the interrupts while acquiring the lock.
      The callback may be invoked either in IRQ or BH context depending on the
      USB host controller.
      Use the _irqsave variant of the locking primitives.
      
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: linux-bluetooth@vger.kernel.org
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a5e50d5b
    • J
      Bluetooth: Add a new Realtek 8723DE ID 0bda:b009 · 45ae68b8
      Jian-Hong Pan 提交于
      Without this patch we cannot turn on the Bluethooth adapter on HP
      14-bs007la.
      
      T:  Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#=  4 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0bda ProdID=b009 Rev= 2.00
      S:  Manufacturer=Realtek
      S:  Product=802.11n WLAN Adapter
      S:  SerialNumber=00e04c000001
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      Signed-off-by: NJian-Hong Pan <jian-hong@endlessm.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      45ae68b8
  11. 17 6月, 2018 1 次提交
    • D
      bluetooth: hci_nokia: Don't include linux/unaligned/le_struct.h directly. · a9122886
      David S. Miller 提交于
      This breaks the build as this header is not meant to be used in this
      way.
      
      ./include/linux/unaligned/access_ok.h:8:28: error: redefinition of ‘get_unaligned_le16’
       static __always_inline u16 get_unaligned_le16(const void *p)
                                  ^~~~~~~~~~~~~~~~~~
      In file included from drivers/bluetooth/hci_nokia.c:32:
      ./include/linux/unaligned/le_struct.h:7:19: note: previous definition of ‘get_unaligned_le16’ was here
       static inline u16 get_unaligned_le16(const void *p)
      
      Use asm/unaligned.h instead.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9122886
  12. 30 5月, 2018 4 次提交
    • A
      Bluetooth: btusb: Add additional device ID for RTL8822BE · 1cd2fabf
      Artiom Vaskov 提交于
      The Asus ROG GL702ZC laptop contains a Realtek RTL8822BE device with
      an associated BT chip using a USB ID of 13d3:3526. This ID is added
      to the driver.
      
      The /sys/kernel/debug/usb/devices portion for this device is:
      
      T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  5 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3526 Rev= 1.10
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      S:  SerialNumber=00e04c000001
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      Signed-off-by: NArtiom Vaskov <velemas@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      1cd2fabf
    • H
      Bluetooth: hci_serdev: Fix HCI_UART_INIT_PENDING not working · fdee6d8f
      Hans de Goede 提交于
      Init hci_uart->init_ready so that hci_uart_init_ready() works properly.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fdee6d8f
    • H
      Bluetooth: hci_serdev: Move serdev_device_close/open into common hci_serdev code · e9ca0807
      Hans de Goede 提交于
      Make hci_uart_register_device() and hci_uart_unregister_device() call
      serdev_device_close()/open() themselves instead of relying on the various
      hci_uart drivers to do this for them.
      
      Besides reducing code complexity, this also ensures correct error checking
      of serdev_device_open(), which was missing in a few drivers.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e9ca0807
    • H
      Bluetooth: hci_uart: Restore hci_dev->flush callback on open() · 412fe29f
      Hans de Goede 提交于
      For reasons explained in detail in commit 3611f4d2 ("hci_ldisc:
      fix null pointer deref") the hci_uart_close() functions sets
      hci_dev->flush to NULL.
      
      But the device may be re-opened after a close, this commit restores the
      hci_dev->flush callback on open().
      
      Note this commit also moves the nearly empty defition of hci_uart_open()
      a bit down in the file to avoid the need for forward declaring
      hci_uart_flush().
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      412fe29f