* linux-next: manual merge of the bluetooth tree with the master tree
@ 2026-08-25 13:09 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2026-08-25 13:09 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg
Cc: Hans de Goede, Ibrahim Abdelkader, Linux Kernel Mailing List,
Linux Next Mailing List, Luiz Augusto von Dentz, Pauli Virtanen,
Radek Podgorny
[-- Attachment #1: Type: text/plain, Size: 3374 bytes --]
Hi all,
Today's linux-next merge of the bluetooth tree got a conflict in:
net/bluetooth/hci_sync.c
between commit:
cb19774faa57c ("Bluetooth: hci_sync: Clear HCI_CMD_PENDING when dropping the last request")
from the master tree and commits:
ed516e3f1aa61 ("Bluetooth: hci_sync: Clear HCI_CMD_PENDING when dropping the last request")
2fe8aa99af557 ("Bluetooth: hci_sync: Factor common cleanup code into a helper")
from the bluetooth tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined net/bluetooth/hci_sync.c
index ffd7b37e74018,24eeb76f72074..0000000000000
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@@ -5358,6 -5358,30 +5358,30 @@@ static int hci_dev_init_sync(struct hci
return ret;
}
+ static void hci_dev_drop_last_cmd_req_and_close(struct hci_dev *hdev)
+ {
+ /* Drop last sent command */
+ if (hdev->sent_cmd) {
+ cancel_delayed_work_sync(&hdev->cmd_timer);
+ kfree_skb(hdev->sent_cmd);
+ hdev->sent_cmd = NULL;
+ }
+
+ /* Drop last request */
+ if (hdev->req_skb) {
+ kfree_skb(hdev->req_skb);
+ hdev->req_skb = NULL;
+ hci_dev_clear_flag(hdev, HCI_CMD_PENDING);
+ }
+
+ clear_bit(HCI_RUNNING, &hdev->flags);
+ hci_sock_dev_event(hdev, HCI_DEV_CLOSE);
+
+ /* After this point our queues are empty and no tasks are scheduled. */
+ hdev->close(hdev);
+ hdev->flags &= BIT(HCI_RAW);
+ }
+
int hci_dev_open_sync(struct hci_dev *hdev)
{
int ret;
@@@ -5444,23 -5468,7 +5468,7 @@@
if (hdev->flush)
hdev->flush(hdev);
- if (hdev->sent_cmd) {
- cancel_delayed_work_sync(&hdev->cmd_timer);
- kfree_skb(hdev->sent_cmd);
- hdev->sent_cmd = NULL;
- }
-
- if (hdev->req_skb) {
- kfree_skb(hdev->req_skb);
- hdev->req_skb = NULL;
- hci_dev_clear_flag(hdev, HCI_CMD_PENDING);
- }
-
- clear_bit(HCI_RUNNING, &hdev->flags);
- hci_sock_dev_event(hdev, HCI_DEV_CLOSE);
-
- hdev->close(hdev);
- hdev->flags &= BIT(HCI_RAW);
+ hci_dev_drop_last_cmd_req_and_close(hdev);
}
done:
@@@ -5627,28 -5635,10 +5635,10 @@@ int hci_dev_close_sync(struct hci_dev *
skb_queue_purge(&hdev->cmd_q);
skb_queue_purge(&hdev->raw_q);
- /* Drop last sent command */
- if (hdev->sent_cmd) {
- cancel_delayed_work_sync(&hdev->cmd_timer);
- kfree_skb(hdev->sent_cmd);
- hdev->sent_cmd = NULL;
- }
-
- /* Drop last request */
- if (hdev->req_skb) {
- kfree_skb(hdev->req_skb);
- hdev->req_skb = NULL;
- hci_dev_clear_flag(hdev, HCI_CMD_PENDING);
- }
-
- clear_bit(HCI_RUNNING, &hdev->flags);
- hci_sock_dev_event(hdev, HCI_DEV_CLOSE);
-
- /* After this point our queues are empty and no tasks are scheduled. */
- hdev->close(hdev);
+ /* Drop last sent command, last request and close */
+ hci_dev_drop_last_cmd_req_and_close(hdev);
/* Clear flags */
- hdev->flags &= BIT(HCI_RAW);
hci_dev_clear_volatile_flags(hdev);
hci_dev_clear_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-25 13:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 13:09 linux-next: manual merge of the bluetooth tree with the master tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox