Skip to content

Get bluetooth working on MBP13,3#1

Open
roadrunner2 wants to merge 4 commits into
l1k:hci_bcmfrom
roadrunner2:hci_bcm
Open

Get bluetooth working on MBP13,3#1
roadrunner2 wants to merge 4 commits into
l1k:hci_bcmfrom
roadrunner2:hci_bcm

Conversation

@roadrunner2

Copy link
Copy Markdown

The main two issues were the timing out of operations due to wrong baudrate (2nd commit) and not finding the UART (3rd commit). Things work reasonably well with this, though I still occasionally see a timeout on the first command, necessitating a re-attach of the tty.

I still see the following error when attaching the tty:

 Bluetooth: hci0: BCM: failed to write update baudrate (-16)   (-EBUSY)

But it is benign, as the UART device does not appear to need its baud rate changed.

Finally, the 4th commit fixes the following two BUG's:

 BUG: sleeping function called from invalid context at kernel/locking/mutex.c
 in_atomic(): 1, irqs_disabled(): 0, pid: 7303, name: kworker/7:3
 INFO: lockdep is turned off.
 CPU: 7 PID: 7303 Comm: kworker/7:3 Tainted: G        W  OE   4.13.2+ #17
 Hardware name: Apple Inc. MacBookPro13,3/Mac-A5C67F76ED83108C, BIOS MBP133.8
 Workqueue: events hci_uart_write_work [hci_uart]
 Call Trace:
  dump_stack+0x8e/0xd6
  ___might_sleep+0x164/0x250
  __might_sleep+0x4a/0x80
  __mutex_lock+0x59/0xa00
  ? lock_acquire+0xa3/0x1f0
  ? lock_acquire+0xa3/0x1f0
  ? hci_uart_write_work+0xd3/0x160 [hci_uart]
  mutex_lock_nested+0x1b/0x20
  ? mutex_lock_nested+0x1b/0x20
  bcm_dequeue+0x21/0xc0 [hci_uart]
  hci_uart_write_work+0xe6/0x160 [hci_uart]
  process_one_work+0x253/0x6a0
  worker_thread+0x4d/0x3b0
  kthread+0x133/0x150
  ? process_one_work+0x6a0/0x6a0
  ? kthread_create_on_node+0x70/0x70
  ret_from_fork+0x2a/0x40

 BUG: sleeping function called from invalid context at kernel/locking/mutex.c
 in_atomic(): 1, irqs_disabled(): 0, pid: 13796, name: kworker/u16:2
 INFO: lockdep is turned off.
 CPU: 1 PID: 13796 Comm: kworker/u16:2 Tainted: G        W  OE   4.13.2+ #17
 Hardware name: Apple Inc. MacBookPro13,3/Mac-A5C67F76ED83108C, BIOS MBP133.8
 Workqueue: events_unbound flush_to_ldisc
 Call Trace:
  dump_stack+0x8e/0xd6
  ___might_sleep+0x164/0x250
  __might_sleep+0x4a/0x80
  __mutex_lock+0x59/0xa00
  ? trace_hardirqs_on+0xd/0x10
  ? hci_recv_frame+0x68/0xa0 [bluetooth]
  ? h4_recv_buf+0x17a/0x2f0 [hci_uart]
  mutex_lock_nested+0x1b/0x20
  ? mutex_lock_nested+0x1b/0x20
  bcm_recv+0x73/0x130 [hci_uart]
  hci_uart_tty_receive+0x61/0xa0 [hci_uart]
  tty_ldisc_receive_buf+0x48/0x50
  tty_port_default_receive_buf+0x49/0x70
  flush_to_ldisc+0x83/0xa0
  process_one_work+0x253/0x6a0
  worker_thread+0x4d/0x3b0
  kthread+0x133/0x150
  ? process_one_work+0x6a0/0x6a0
  ? kthread_create_on_node+0x70/0x70
  ret_from_fork+0x2a/0x40

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants