Message ID | 20240708172650.2752501-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v1] Bluetooth: btusb: Don't fail external suspend requests | expand |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 2d5c971a59ad..bbd75ba9874a 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4700,8 +4700,10 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message) BT_DBG("intf %p", intf); - /* Don't suspend if there are connections */ - if (hci_conn_count(data->hdev)) + /* Don't auto-suspend if there are connections as external suspend calls + * should never be allowed to fail. + */ + if (PMSG_IS_AUTO(message) && hci_conn_count(data->hdev)) return -EBUSY; if (data->suspend_count++)