Fix a bluetooth autosuspend issue on some XPS 13s (rhbz 1514836)

This commit is contained in:
Jeremy Cline 2018-04-27 13:08:45 -04:00
parent 8a80a030dc
commit 8b94128329
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
2 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,107 @@
From b24b8a41fb5461d1f2105b18a3106cb0a2d5e058 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 26 Apr 2018 20:52:06 +0200
Subject: [PATCH 1/2] Bluetooth: btusb: Add Dell XPS 13 9360 to
btusb_needs_reset_resume_table
The Dell XPS 13 9360 uses a QCA Rome chip which needs to be reset
(and have its firmware reloaded) for bluetooth to work after
suspend/resume.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
Cc: stable@vger.kernel.org
Cc: Garrett LeSage <glesage@redhat.com>
Reported-and-tested-by: Garrett LeSage <glesage@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
---
drivers/bluetooth/btusb.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 366a49c7c08f..409d7eff08a4 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -392,6 +392,13 @@ static const struct dmi_system_id btusb_needs_reset_resume_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 3060"),
},
},
+ {
+ /* Dell XPS 9360 (QCA ROME device 0cf3:e300) */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
+ },
+ },
{}
};
--
2.17.0
From 50f2db2f8eccc7a31d899a0dee35f3a1f0c740fe Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 27 Apr 2018 11:26:43 +0200
Subject: [PATCH 2/2] Bluetooth: btusb: Only check needs_reset_resume DMI table
for QCA rome chipsets
Jeremy Cline correctly points out in rhbz#1514836 that a device where the
QCA rome chipset needs the USB_QUIRK_RESET_RESUME quirk, may also ship
with a different wifi/bt chipset in some configurations.
If that is the case then we are needlessly penalizing those other chipsets
with a reset-resume quirk, typically causing 0.4W extra power use because
this disables runtime-pm.
This commit moves the DMI table check to a btusb_check_needs_reset_resume()
helper (so that we can easily also call it for other chipsets) and calls
this new helper only for QCA_ROME chipsets for now.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
Cc: stable@vger.kernel.org
Cc: Jeremy Cline <jcline@redhat.com>
Suggested-by: Jeremy Cline <jcline@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
---
drivers/bluetooth/btusb.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 409d7eff08a4..ebc9cb23a108 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2846,6 +2846,12 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
}
#endif
+static void btusb_check_needs_reset_resume(struct usb_interface *intf)
+{
+ if (dmi_check_system(btusb_needs_reset_resume_table))
+ interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
+}
+
static int btusb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
@@ -2968,9 +2974,6 @@ static int btusb_probe(struct usb_interface *intf,
hdev->send = btusb_send_frame;
hdev->notify = btusb_notify;
- if (dmi_check_system(btusb_needs_reset_resume_table))
- interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
-
#ifdef CONFIG_PM
err = btusb_config_oob_wake(hdev);
if (err)
@@ -3057,6 +3060,7 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_QCA_ROME) {
data->setup_on_usb = btusb_setup_qca;
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
+ btusb_check_needs_reset_resume(intf);
}
#ifdef CONFIG_BT_HCIBTUSB_RTL
--
2.17.0

View File

@ -659,6 +659,9 @@ Patch506: ACPI-video-Only-default-only_lcd-to-true-on-Win8-ready-_desktops_.patc
# rhbz 1565131
Patch507: xhci-Fix-Kernel-oops-in-xhci-dbgtty.patch
# rhbz 1514836
Patch508: Bluetooth-btusb-autosuspend-XPS-13-9360-fixes.patch
# END OF PATCH DEFINITIONS
%endif
@ -1931,6 +1934,9 @@ fi
#
#
%changelog
* Fri Apr 27 2018 Jeremy Cline <jeremy@jcline.org>
- Fix an issue with bluetooth autosupsend on some XPS 13 9360 (rhbz 1514836)
* Fri Apr 27 2018 Peter Robinson <pbrobinson@fedoraproject.org>
- Enable QLogic NICs on ARM