Dear Luiz,
Thank you for the patch.
Am 14.10.24 um 22:23 schrieb Luiz Augusto von Dentz:
From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
Calls to hci_suspend_dev assumes the system-suspend which doesn't work
well when just the device is being suspended because wakeup flag is only
set for remote devices that can wakeup the system.
Please mention that you revert most parts of the problematic commit.
Reported-by: Rafael J. Wysocki <rafael@xxxxxxxxxx>
Reported-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Reported-by: Kenneth Crudup <kenny@xxxxxxxxx>
Fixes: 81b3e33bb054 ("Bluetooth: btusb: Don't fail external suspend requests")
That commit is not in the master branch,
610712298b11b2914be00b35abe9326b5dbb62c8 is.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
---
drivers/bluetooth/btusb.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d14b941bfde8..c0b6ef8ee5da 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4075,7 +4075,6 @@ static void btusb_disconnect(struct usb_interface *intf)
static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
{
struct btusb_data *data = usb_get_intfdata(intf);
- int err;
BT_DBG("intf %p", intf);
@@ -4088,16 +4087,6 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
if (data->suspend_count++)
return 0;
- /* Notify Host stack to suspend; this has to be done before stopping
- * the traffic since the hci_suspend_dev itself may generate some
- * traffic.
- */
- err = hci_suspend_dev(data->hdev);
- if (err) {
- data->suspend_count--;
- return err;
- }
-
spin_lock_irq(&data->txlock);
if (!(PMSG_IS_AUTO(message) && data->tx_in_flight)) {
set_bit(BTUSB_SUSPENDING, &data->flags);
@@ -4105,7 +4094,6 @@ static int btusb_suspend(struct usb_interface *intf, pm_message_t message)
} else {
spin_unlock_irq(&data->txlock);
data->suspend_count--;
- hci_resume_dev(data->hdev);
return -EBUSY;
}
@@ -4226,8 +4214,6 @@ static int btusb_resume(struct usb_interface *intf)
spin_unlock_irq(&data->txlock);
schedule_work(&data->work);
- hci_resume_dev(data->hdev);
-
return 0;
failed:
Kind regards,
Paul