1. 21 Jan, 2022 6 commits
    • Mark Chen's avatar
      Bluetooth: mt7921s: fix firmware coredump retrieve · 2fc967cc
      Mark Chen authored
      According to the MCU firmware behavior, as the driver is aware of the
      notification of the interrupt source FW_MAILBOX_INT that shows the MCU
      completed delivered a core dump piece to the host, the driver must
      acknowledge the MCU with the register PH2DSM0R bit PH2DSM0R_DRIVER_OWN
      to notify the MCU to handle the next core dump piece.
      
      Fixes: db57b625 ("Bluetooth: btmtksdio: add support of processing firmware coredump and log")
      Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarMark Chen <mark-yw.chen@mediatek.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      2fc967cc
    • Pavel Skripkin's avatar
      Bluetooth: hci_serdev: call init_rwsem() before p->open() · 9d7cbe2b
      Pavel Skripkin authored
      kvartet reported, that hci_uart_tx_wakeup() uses uninitialized rwsem.
      The problem was in wrong place for percpu_init_rwsem() call.
      
      hci_uart_proto::open() may register a timer whose callback may call
      hci_uart_tx_wakeup(). There is a chance, that hci_uart_register_device()
      thread won't be fast enough to call percpu_init_rwsem().
      
      Fix it my moving percpu_init_rwsem() call before p->open().
      
      INFO: trying to register non-static key.
      The code is fine but needs lockdep annotation, or maybe
      you didn't initialize this object before use?
      turning off the locking correctness validator.
      CPU: 2 PID: 18524 Comm: syz-executor.5 Not tainted 5.16.0-rc6 #9
      ...
      Call Trace:
       <IRQ>
       __dump_stack lib/dump_stack.c:88 [inline]
       dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
       assign_lock_key kernel/locking/lockdep.c:951 [inline]
       register_lock_class+0x148d/0x1950 kernel/locking/lockdep.c:1263
       __lock_acquire+0x106/0x57e0 kernel/locking/lockdep.c:4906
       lock_acquire kernel/locking/lockdep.c:5637 [inline]
       lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5602
       percpu_down_read_trylock include/linux/percpu-rwsem.h:92 [inline]
       hci_uart_tx_wakeup+0x12e/0x490 drivers/bluetooth/hci_ldisc.c:124
       h5_timed_event+0x32f/0x6a0 drivers/bluetooth/hci_h5.c:188
       call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
      
      Fixes: d73e1728 ("Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops")
      Reported-by: default avatarYiru Xu <xyru1999@gmail.com>
      Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      9d7cbe2b
    • Tedd Ho-Jeong An's avatar
      Bluetooth: Remove kernel-doc style comment block · a86974f7
      Tedd Ho-Jeong An authored
      This patch changes the kernel-doc style comment block to common comment
      block. These files don't support kernel-doc style so no need to use the
      kernel-doc style. Also, they cause the warning when W=1 option is used
      as below.
      
      drivers/bluetooth/hci_ll.c:518: warning: Function parameter or member 'lldev' not described in 'download_firmware'
      drivers/bluetooth/btmrvl_debugfs.c:29: warning: cannot understand function prototype: 'struct btmrvl_debugfs_data '
      drivers/bluetooth/btmrvl_sdio.c:36: warning: expecting prototype for Marvell BT-over-SDIO driver(). Prototype was for VERSION() instead
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a86974f7
    • Ismael Ferreras Morezuelas's avatar
      Bluetooth: btusb: Whitespace fixes for btusb_setup_csr() · aa17e8ce
      Ismael Ferreras Morezuelas authored
      Properly align the list items of the quirk for readability.
      No functional changes intended. Trivial stuff.
      
      Fixes: 0671c066 ("Bluetooth: btusb: Add workaround for remote-wakeup issues with Barrot 8041a02 fake CSR controllers")
      Signed-off-by: default avatarIsmael Ferreras Morezuelas <swyterzone@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      aa17e8ce
    • Larry Finger's avatar
      Bluetooth: btusb: Add one more Bluetooth part for the Realtek RTL8852AE · 2e7b4a32
      Larry Finger authored
      This Realtek device has both wifi and BT components. The latter reports
      a USB ID of 0bda:2852, which is not in the table.
      
      BT device description in /sys/kernel/debug/usb/devices contains the following entries:
      
      T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
      D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
      P: Vendor=0bda ProdID=2852 Rev= 0.00
      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
      
      The missing USB_ID was reported by user trius65 at https://github.com/lwfinger/rtw89/issues/122Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      2e7b4a32
    • Tedd Ho-Jeong An's avatar
      Bluetooth: btintel: Fix WBS setting for Intel legacy ROM products · 55235304
      Tedd Ho-Jeong An authored
      This patch adds the flag to identify the Intel legacy ROM products that
      don't support WBS like WP and StP.
      
      Fixes: 3df4dfbe ("Bluetooth: btintel: Move hci quirks to setup routine")
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      55235304
  2. 20 Jan, 2022 2 commits
  3. 14 Jan, 2022 1 commit
  4. 11 Jan, 2022 1 commit
  5. 10 Jan, 2022 30 commits