[1/1,SRU,B,D,E,Unstable] Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
diff mbox series

Message ID 20190917082151.13829-2-acelan.kao@canonical.com
State New
Headers show
Series
  • BT advertising packet wakes up the system from S3 and suspend-to-idle
Related show

Commit Message

AceLan Kao Sept. 17, 2019, 8:21 a.m. UTC
From: Mario Limonciello <mario.limonciello@dell.com>

BugLink: https://bugs.launchpad.net/bugs/1844247

This reverts commit a0085f2510e8976614ad8f766b209448b385492f.

This commit has caused regressions in notebooks that support suspend
to idle such as the XPS 9360, XPS 9370 and XPS 9380.

These notebooks will wakeup from suspend to idle from an unsolicited
advertising packet from an unpaired BLE device.

In a bug report it was sugggested that this is caused by a generic
lack of LE privacy support.  Revert this commit until that behavior
can be avoided by the kernel.

Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2
Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
CC: Bastien Nocera <hadess@hadess.net>
CC: Christian Kellner <ckellner@redhat.com>
CC: Sukumar Ghorai <sukumar.ghorai@intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/bluetooth/btusb.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Kai-Heng Feng Sept. 17, 2019, 8:41 a.m. UTC | #1
On Tue, Sep 17, 2019 at 10:22 AM AceLan Kao <acelan.kao@canonical.com> wrote:
>
> From: Mario Limonciello <mario.limonciello@dell.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1844247
>
> This reverts commit a0085f2510e8976614ad8f766b209448b385492f.
>
> This commit has caused regressions in notebooks that support suspend
> to idle such as the XPS 9360, XPS 9370 and XPS 9380.
>
> These notebooks will wakeup from suspend to idle from an unsolicited
> advertising packet from an unpaired BLE device.
>
> In a bug report it was sugggested that this is caused by a generic
> lack of LE privacy support.  Revert this commit until that behavior
> can be avoided by the kernel.
>
> Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
> Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2
> Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
> CC: Bastien Nocera <hadess@hadess.net>
> CC: Christian Kellner <ckellner@redhat.com>
> CC: Sukumar Ghorai <sukumar.ghorai@intel.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f)
> Signed-off-by: AceLan Kao <acelan.kao@canonical.com>

Acked-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

> ---
>  drivers/bluetooth/btusb.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 21e8071257b9..5c5f67dea4bd 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -1128,10 +1128,6 @@ static int btusb_open(struct hci_dev *hdev)
>         }
>
>         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);
>
>         if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
>                 goto done;
> @@ -1195,7 +1191,6 @@ static int btusb_close(struct hci_dev *hdev)
>                 goto failed;
>
>         data->intf->needs_remote_wakeup = 0;
> -       device_wakeup_disable(&data->udev->dev);
>         usb_autopm_put_interface(data->intf);
>
>  failed:
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
You-Sheng Yang Sept. 24, 2019, 8:42 a.m. UTC | #2
Acked-By: You-Sheng Yang <vicamo.yang@canonical.com>

On 2019/9/17 4:21 PM, AceLan Kao wrote:
> From: Mario Limonciello <mario.limonciello@dell.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1844247
> 
> This reverts commit a0085f2510e8976614ad8f766b209448b385492f.
> 
> This commit has caused regressions in notebooks that support suspend
> to idle such as the XPS 9360, XPS 9370 and XPS 9380.
> 
> These notebooks will wakeup from suspend to idle from an unsolicited
> advertising packet from an unpaired BLE device.
> 
> In a bug report it was sugggested that this is caused by a generic
> lack of LE privacy support.  Revert this commit until that behavior
> can be avoided by the kernel.
> 
> Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
> Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2
> Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
> CC: Bastien Nocera <hadess@hadess.net>
> CC: Christian Kellner <ckellner@redhat.com>
> CC: Sukumar Ghorai <sukumar.ghorai@intel.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f)
> Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
> ---
>  drivers/bluetooth/btusb.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 21e8071257b9..5c5f67dea4bd 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -1128,10 +1128,6 @@ static int btusb_open(struct hci_dev *hdev)
>  	}
>  
>  	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);
>  
>  	if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
>  		goto done;
> @@ -1195,7 +1191,6 @@ static int btusb_close(struct hci_dev *hdev)
>  		goto failed;
>  
>  	data->intf->needs_remote_wakeup = 0;
> -	device_wakeup_disable(&data->udev->dev);
>  	usb_autopm_put_interface(data->intf);
>  
>  failed:
>
Connor Kuehl Sept. 25, 2019, 5:06 p.m. UTC | #3
On 9/17/19 1:21 AM, AceLan Kao wrote:
> From: Mario Limonciello <mario.limonciello@dell.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1844247
> 
> This reverts commit a0085f2510e8976614ad8f766b209448b385492f.
> 
> This commit has caused regressions in notebooks that support suspend
> to idle such as the XPS 9360, XPS 9370 and XPS 9380.
> 
> These notebooks will wakeup from suspend to idle from an unsolicited
> advertising packet from an unpaired BLE device.
> 
> In a bug report it was sugggested that this is caused by a generic
> lack of LE privacy support.  Revert this commit until that behavior
> can be avoided by the kernel.
> 
> Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
> Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2
> Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
> CC: Bastien Nocera <hadess@hadess.net>
> CC: Christian Kellner <ckellner@redhat.com>
> CC: Sukumar Ghorai <sukumar.ghorai@intel.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f)
> Signed-off-by: AceLan Kao <acelan.kao@canonical.com>

Acked-by: Connor Kuehl <connor.kuehl@canonical.com>

> ---
>   drivers/bluetooth/btusb.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 21e8071257b9..5c5f67dea4bd 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -1128,10 +1128,6 @@ static int btusb_open(struct hci_dev *hdev)
>   	}
>   
>   	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);
>   
>   	if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
>   		goto done;
> @@ -1195,7 +1191,6 @@ static int btusb_close(struct hci_dev *hdev)
>   		goto failed;
>   
>   	data->intf->needs_remote_wakeup = 0;
> -	device_wakeup_disable(&data->udev->dev);
>   	usb_autopm_put_interface(data->intf);
>   
>   failed:
>
Seth Forshee Sept. 27, 2019, 12:46 p.m. UTC | #4
On Tue, Sep 17, 2019 at 04:21:51PM +0800, AceLan Kao wrote:
> From: Mario Limonciello <mario.limonciello@dell.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1844247
> 
> This reverts commit a0085f2510e8976614ad8f766b209448b385492f.
> 
> This commit has caused regressions in notebooks that support suspend
> to idle such as the XPS 9360, XPS 9370 and XPS 9380.
> 
> These notebooks will wakeup from suspend to idle from an unsolicited
> advertising packet from an unpaired BLE device.
> 
> In a bug report it was sugggested that this is caused by a generic
> lack of LE privacy support.  Revert this commit until that behavior
> can be avoided by the kernel.
> 
> Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
> Link: https://marc.info/?l=linux-bluetooth&m=156441081612627&w=2
> Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
> CC: Bastien Nocera <hadess@hadess.net>
> CC: Christian Kellner <ckellner@redhat.com>
> CC: Sukumar Ghorai <sukumar.ghorai@intel.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> (cherry picked from commit 1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f)
> Signed-off-by: AceLan Kao <acelan.kao@canonical.com>

This commit is in 5.3 and therefore already present in eoan.

Patch
diff mbox series

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 21e8071257b9..5c5f67dea4bd 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1128,10 +1128,6 @@  static int btusb_open(struct hci_dev *hdev)
 	}
 
 	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);
 
 	if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
 		goto done;
@@ -1195,7 +1191,6 @@  static int btusb_close(struct hci_dev *hdev)
 		goto failed;
 
 	data->intf->needs_remote_wakeup = 0;
-	device_wakeup_disable(&data->udev->dev);
 	usb_autopm_put_interface(data->intf);
 
 failed: