From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This enables buffer flow controler for SCO/eSCO which apparently for some reason has not been in use up until now which caused sco_cnt to never be updated, but recently this has caused the following problem: < HCI Command: Read Buffer Size (0x04|0x0005) plen 0 > HCI Event: Command Complete (0x0e) plen 11 Read Buffer Size (0x04|0x0005) ncmd 1 Status: Success (0x00) ACL MTU: 1021 ACL max packet: 5 SCO MTU: 240 SCO max packet: 8 ... < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 < SCO Data TX: Handle 257 flags 0x00 dlen 120 > HCI Event: Hardware Error (0x10) plen 1 Code: 0x0a Fixes: 7fedd3bb6b77 ("Bluetooth: Prioritize SCO traffic") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> --- net/bluetooth/hci_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index e7ec12437c8b..5c88d3816c6a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3564,6 +3564,7 @@ static void hci_sched_sco(struct hci_dev *hdev) BT_DBG("skb %p len %d", skb, skb->len); hci_send_frame(hdev, skb); + hdev->sco_cnt--; conn->sent++; if (conn->sent == ~0) conn->sent = 0; @@ -3588,6 +3589,7 @@ static void hci_sched_esco(struct hci_dev *hdev) BT_DBG("skb %p len %d", skb, skb->len); hci_send_frame(hdev, skb); + hdev->sco_cnt--; conn->sent++; if (conn->sent == ~0) conn->sent = 0; -- 2.48.1