diff mbox series

Bluetooth: hci_core: Rate limit the logging of invalid SCO handle

Message ID 20220125191537.2426630-1-luiz.dentz@gmail.com
State New
Headers show
Series Bluetooth: hci_core: Rate limit the logging of invalid SCO handle | expand

Commit Message

Luiz Augusto von Dentz Jan. 25, 2022, 7:15 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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>
---
 net/bluetooth/hci_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Jan. 25, 2022, 7:52 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=608393

---Test result---

Test Summary:
CheckPatch                    PASS      1.56 seconds
GitLint                       PASS      1.03 seconds
SubjectPrefix                 PASS      0.85 seconds
BuildKernel                   PASS      29.74 seconds
BuildKernel32                 PASS      26.66 seconds
Incremental Build with patchesPASS      36.42 seconds
TestRunner: Setup             PASS      469.09 seconds
TestRunner: l2cap-tester      PASS      13.42 seconds
TestRunner: bnep-tester       PASS      6.12 seconds
TestRunner: mgmt-tester       PASS      104.48 seconds
TestRunner: rfcomm-tester     PASS      7.37 seconds
TestRunner: sco-tester        PASS      7.62 seconds
TestRunner: smp-tester        PASS      7.49 seconds
TestRunner: userchan-tester   PASS      6.37 seconds



---
Regards,
Linux Bluetooth
Marcel Holtmann Jan. 25, 2022, 9:41 p.m. UTC | #2
Hi Luiz,

> 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>
> ---
> net/bluetooth/hci_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 14c2da9d33ff..5bde0ec41177 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3667,8 +3667,8 @@  static void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)
 		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);