1. 25 1月, 2021 2 次提交
  2. 07 12月, 2020 6 次提交
  3. 20 9月, 2020 1 次提交
  4. 19 9月, 2020 1 次提交
  5. 13 9月, 2020 1 次提交
    • A
      Bluetooth: Emit controller suspend and resume events · 2f20216c
      Abhishek Pandit-Subedi 提交于
      Emit controller suspend and resume events when we are ready for suspend
      and we've resumed from suspend.
      
      The controller suspend event will report whatever suspend state was
      successfully entered. The controller resume event will check the first
      HCI event that was received after we finished preparing for suspend and,
      if it was a connection event, store the address of the peer that caused
      the event. If it was not a connection event, we mark the wake reason as
      an unexpected event.
      
      Here is a sample btmon trace with these events:
      
      @ MGMT Event: Controller Suspended (0x002d) plen 1
              Suspend state: Page scanning and/or passive scanning (2)
      
      @ MGMT Event: Controller Resumed (0x002e) plen 8
              Wake reason: Remote wake due to peer device connection (2)
              LE Address: CD:F3:CD:13:C5:9A (OUI CD-F3-CD)
      Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NMiao-chen Chou <mcchou@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2f20216c
  6. 11 9月, 2020 2 次提交
  7. 01 9月, 2020 1 次提交
  8. 30 7月, 2020 2 次提交
  9. 29 7月, 2020 1 次提交
    • A
      Bluetooth: Fix suspend notifier race · 4e8c36c3
      Abhishek Pandit-Subedi 提交于
      Unregister from suspend notifications and cancel suspend preparations
      before running hci_dev_do_close. Otherwise, the suspend notifier may
      race with unregister and cause cmd_timeout even after hdev has been
      freed.
      
      Below is the trace from when this panic was seen:
      
      [  832.578518] Bluetooth: hci_core.c:hci_cmd_timeout() hci0: command 0x0c05 tx timeout
      [  832.586200] BUG: kernel NULL pointer dereference, address: 0000000000000000
      [  832.586203] #PF: supervisor read access in kernel mode
      [  832.586205] #PF: error_code(0x0000) - not-present page
      [  832.586206] PGD 0 P4D 0
      [  832.586210] PM: suspend exit
      [  832.608870] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [  832.613232] CPU: 3 PID: 10755 Comm: kworker/3:7 Not tainted 5.4.44-04894-g1e9dbb96a161 #1
      [  832.630036] Workqueue: events hci_cmd_timeout [bluetooth]
      [  832.630046] RIP: 0010:__queue_work+0xf0/0x374
      [  832.630051] RSP: 0018:ffff9b5285f1fdf8 EFLAGS: 00010046
      [  832.674033] RAX: ffff8a97681bac00 RBX: 0000000000000000 RCX: ffff8a976a000600
      [  832.681162] RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffff8a976a000748
      [  832.688289] RBP: ffff9b5285f1fe38 R08: 0000000000000000 R09: ffff8a97681bac00
      [  832.695418] R10: 0000000000000002 R11: ffff8a976a0006d8 R12: ffff8a9745107600
      [  832.698045] usb 1-6: new full-speed USB device number 119 using xhci_hcd
      [  832.702547] R13: ffff8a9673658850 R14: 0000000000000040 R15: 000000000000001e
      [  832.702549] FS:  0000000000000000(0000) GS:ffff8a976af80000(0000) knlGS:0000000000000000
      [  832.702550] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  832.702550] CR2: 0000000000000000 CR3: 000000010415a000 CR4: 00000000003406e0
      [  832.702551] Call Trace:
      [  832.702558]  queue_work_on+0x3f/0x68
      [  832.702562]  process_one_work+0x1db/0x396
      [  832.747397]  worker_thread+0x216/0x375
      [  832.751147]  kthread+0x138/0x140
      [  832.754377]  ? pr_cont_work+0x58/0x58
      [  832.758037]  ? kthread_blkcg+0x2e/0x2e
      [  832.761787]  ret_from_fork+0x22/0x40
      [  832.846191] ---[ end trace fa93f466da517212 ]---
      
      Fixes: 9952d90e ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND")
      Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NMiao-chen Chou <mcchou@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      4e8c36c3
  10. 28 7月, 2020 2 次提交
  11. 07 7月, 2020 2 次提交
  12. 18 6月, 2020 6 次提交
  13. 12 6月, 2020 2 次提交
  14. 08 6月, 2020 1 次提交
  15. 13 5月, 2020 2 次提交
  16. 16 4月, 2020 1 次提交
  17. 15 4月, 2020 1 次提交
  18. 05 4月, 2020 2 次提交
  19. 03 4月, 2020 1 次提交
    • A
      Bluetooth: Prioritize SCO traffic · 7fedd3bb
      Abhishek Pandit-Subedi 提交于
      When scheduling TX packets, send all SCO/eSCO packets first, check for
      pending SCO/eSCO packets after every ACL/LE packet and send them if any
      are pending.  This is done to make sure that we can meet SCO deadlines
      on slow interfaces like UART.
      
      If we were to queue up multiple ACL packets without checking for a SCO
      packet, we might miss the SCO timing. For example:
      
      The time it takes to send a maximum size ACL packet (1024 bytes):
      t = 10/8 * 1024 bytes * 8 bits/byte * 1 packet / baudrate
              where 10/8 is uart overhead due to start/stop bits per byte
      
      Replace t = 3.75ms (SCO deadline), which gives us a baudrate of 2730666.
      
      At a baudrate of 3000000, if we didn't check for SCO packets within 1024
      bytes, we would miss the 3.75ms timing window.
      Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7fedd3bb
  20. 24 3月, 2020 1 次提交
  21. 12 3月, 2020 2 次提交