]> Git Repo - linux.git/commitdiff
Bluetooth: btusb: Don't suspend when there are connections
authorLuiz Augusto von Dentz <[email protected]>
Tue, 2 May 2023 22:11:59 +0000 (15:11 -0700)
committerLuiz Augusto von Dentz <[email protected]>
Fri, 22 Dec 2023 17:54:30 +0000 (12:54 -0500)
This checks if there are connections before suspending since that may
disrupt the connections making it stop receiving any data if remote
wakeup is not enabled.

Signed-off-by: Luiz Augusto von Dentz <[email protected]>
drivers/bluetooth/btusb.c

index b8e9de887b5de44e4968590b29e268de8d7917cd..0926e4451802e06a67a51f25948139d99ad39937 100644 (file)
@@ -4629,6 +4629,10 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
 
        BT_DBG("intf %p", intf);
 
 
        BT_DBG("intf %p", intf);
 
+       /* Don't suspend if there are connections */
+       if (hci_conn_count(data->hdev))
+               return -EBUSY;
+
        if (data->suspend_count++)
                return 0;
 
        if (data->suspend_count++)
                return 0;
 
This page took 0.064516 seconds and 4 git commands to generate.