linux-next: manual merge of the net-next tree with Linus' tree

From: Mark Brown
Date: Sun Sep 15 2019 - 16:24:44 EST


Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

drivers/bluetooth/btusb.c

between commit:

1ffdb51f28e8ec ("Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"")

from Linus' tree and commit:

9e45524a011107 ("Bluetooth: btusb: Fix suspend issue for Realtek devices")

from the net-next 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 --cc drivers/bluetooth/btusb.c
index ba41490543040,ed455de598eae..0000000000000
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@@ -1173,7 -1201,18 +1204,14 @@@ static int btusb_open(struct hci_dev *h
}

data->intf->needs_remote_wakeup = 1;
- /* device specific wakeup source enabled and required for USB
- * remote wakeup while host is suspended
- */
- device_wakeup_enable(&data->udev->dev);

+ /* Disable device remote wakeup when host is suspended
+ * For Realtek chips, global suspend without
+ * SET_FEATURE (DEVICE_REMOTE_WAKEUP) can save more power in device.
+ */
+ if (test_bit(BTUSB_WAKEUP_DISABLE, &data->flags))
+ device_wakeup_disable(&data->udev->dev);
+
if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
goto done;

@@@ -1237,6 -1276,12 +1275,11 @@@ static int btusb_close(struct hci_dev *
goto failed;

data->intf->needs_remote_wakeup = 0;
+
+ /* Enable remote wake up for auto-suspend */
+ if (test_bit(BTUSB_WAKEUP_DISABLE, &data->flags))
+ data->intf->needs_remote_wakeup = 1;
+
- device_wakeup_disable(&data->udev->dev);
usb_autopm_put_interface(data->intf);

failed:

Attachment: signature.asc
Description: PGP signature