All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP
@ 2025-11-13 15:12 Luiz Augusto von Dentz
  2025-11-13 15:39 ` [v1] " bluez.test.bot
  2025-11-13 16:10 ` [PATCH v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-11-13 15:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

HCI_OP_NOP means no command was actually sent so there is no point in
triggering cmd_timer which may cause a hdev->reset in the process since
it is assumed that the controller is stuck processing a command.

Fixes: e2d471b7806b ("Bluetooth: ISO: Fix not using SID from adv report")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 3418d7b964a1..9f686e5903a1 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4168,6 +4168,12 @@ static void hci_cmd_work(struct work_struct *work)
 
 		hci_send_cmd_sync(hdev, skb);
 
+		/* Don't trigger cmd_timer in case of HCI_OP_NOP since there is
+		 * no command pending.
+		 */
+		if (hci_skb_opcode(skb) == HCI_OP_NOP)
+			return;
+
 		rcu_read_lock();
 		if (test_bit(HCI_RESET, &hdev->flags) ||
 		    hci_dev_test_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE))
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-13 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 15:12 [PATCH v1] Bluetooth: hci_core: Fix triggering cmd_timer for HCI_OP_NOP Luiz Augusto von Dentz
2025-11-13 15:39 ` [v1] " bluez.test.bot
2025-11-13 16:10 ` [PATCH v1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.