From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 25 Jan 2022 11:15:37 -0800
Subject: Bluetooth: hci_core: Rate limit the logging of invalid SCO handle
Patch-mainline: v5.18-rc1
Git-commit: 2d4b37b67cacbbad6fdb8621333f5ce48ae0e5fd
References: jsc#PED-1407
The invalid SCO handle error is normally caused by a race in the USB
transport where the data and event happen to be 2 different endpoints
so the event carrying the SCO handle is processed after its data.
Note: This can probably be resolved with use of force_poll_sync
debugfs.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
---
net/bluetooth/hci_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3668,8 +3668,8 @@ static void hci_scodata_packet(struct hc
sco_recv_scodata(conn, skb);
return;
} else {
- bt_dev_err(hdev, "SCO packet for unknown connection handle %d",
- handle);
+ bt_dev_err_ratelimited(hdev, "SCO packet for unknown connection handle %d",
+ handle);
}
kfree_skb(skb);