Skip to contentSkip to conversation

Bluetooth: btusb: Use DMI matching for QCA reset_resume quirk

RFC New Hans de Goede 2 participants 7 messages Feb 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Bluetooth: btusb: Use DMI matching for QCA reset_resume quirk

Hi All,

As discussed here is a patch to move the reset_resume quirk adding for QCA devices over from usb-id (chipset) to dmi (platform) matching.

Note this is still a RFC atm, because I still need to get feedback from the reporter with the Yoga 920.

Kai-Heng, can you extend the dmi table with info from the device with the problem you have and then either send me a new version with both entries, or prepare a follow-up patch ?

Regards,

Hans

#1 lore raw

RFC 1/1 Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>
---
 drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +20 -6
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {
+	{
+		/* Lenovo yoga 920 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920"),
+		},
+	},
+	{}
+};
+
 #define BTUSB_MAX_ISOC_FRAMES	10
 
 #define BTUSB_INTR_RUNNING	0
@@ -2945,6 +2962,9 @@ static int btusb_probe(struct usb_interface *intf,
 	hdev->send   = btusb_send_frame;
 	hdev->notify = btusb_notify;
 
+	if (dmi_check_system(btusb_plat_needs_reset_resume_list))
+		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
+
 #ifdef CONFIG_PM
 	err = btusb_config_oob_wake(hdev);
 	if (err)
@@ -3031,12 +3051,6 @@ 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;
-
-		/* QCA Rome devices lose their updated firmware over suspend,
-		 * but the USB hub doesn't notice any status change.
-		 * explicitly request a device reset on resume.
-		 */
-		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
 	}
 
 #ifdef CONFIG_BT_HCIBTUSB_RTL
Signature · 1 line
2.14.3
maintainer
#2 lore raw

Re: [RFC] Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Hi Hans,

Quoted 7 lines

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

Quoted 6 lines

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

just for the record, can we include the /sys/kernel/debug/usb/devices for that device here.

Quoted 23 lines
Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>

---
drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------

1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +1 -0
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
 *
 */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 384

Quoted 5 lines
drivers/bluetooth/btusb.c +2 -0
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a

Actually “btusb” is a driver name. So “Bluetooth USB modules”

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 386

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.

Here s/btusb/module/

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 388

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {

I prefer to use _table instead of _list. Also drop the _plat_ part since that seems obvious.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 390

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+	{
+		/* Lenovo yoga 920 */

Use “Yoga" please.

And I would include “(QCA Rome device VID:PID)” so that we have a record of some sorts.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = {

Quoted 3 lines
drivers/bluetooth/btusb.c +3 -0
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920”),

No DMI_EXACT_MATCH?

Quoted 19 lines
drivers/bluetooth/btusb.c +8 -0
+		},
+	},
+	{}
+};
+
 #define BTUSB_MAX_ISOC_FRAMES	10
 
 #define BTUSB_INTR_RUNNING	0
@@ -2945,6 +2962,9 @@ static int btusb_probe(struct usb_interface *intf,
 	hdev->send   = btusb_send_frame;
 	hdev->notify = btusb_notify;
 
+	if (dmi_check_system(btusb_plat_needs_reset_resume_list))
+		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
+
 #ifdef CONFIG_PM
 	err = btusb_config_oob_wake(hdev);
 	if (err)

drivers/bluetooth/btusb.c static int btusb_probe(struct usb_interface *intf, · line 3054

Quoted 10 lines
drivers/bluetooth/btusb.c +0 -6
@@ -3031,12 +3051,6 @@ 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;
-
-		/* QCA Rome devices lose their updated firmware over suspend,
-		 * but the USB hub doesn't notice any status change.
-		 * explicitly request a device reset on resume.
-		 */
-		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
 	}

It is all cosmetic. So otherwise this looks good.

Regards

Marcel

#3 lore raw

Re: [RFC] Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Hi,

Quoted 9 lines · Marcel Holtmann

Hi Hans,

Quoted 7 lines

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

Quoted 8 lines
Quoted 6 lines

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

just for the record, can we include the /sys/kernel/debug/usb/devices for that device here.

Will do.

Quoted 38 lines
Quoted 22 lines
Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>

---
drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------

1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +1 -0
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 384

Quoted 5 lines
drivers/bluetooth/btusb.c +2 -0
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a

Actually “btusb” is a driver name. So “Bluetooth USB modules”

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 386

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.

Here s/btusb/module/

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 388

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {
Quoted 6 lines

I prefer to use _table instead of _list. Also drop the _plat_ part since that seems obvious.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 390

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+	{
+		/* Lenovo yoga 920 */

Use “Yoga" please.

I will fix all of the above.

Quoted 7 lines

And I would include “(QCA Rome device VID:PID)” so that we have a record of some sorts.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = {

Quoted 3 lines
drivers/bluetooth/btusb.c +3 -0
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920”),

No DMI_EXACT_MATCH?

The DMI data actually has:

"Lenovo YOGA 920-13IKB"

I'm not using DMI_EXACT_MATCH on purpose here, I think Lenovo might change the "-13IKB" part and I don't expect them to fix this bug on newer revisions.

Regards,

Hans

Quoted 37 lines
Quoted 20 lines
drivers/bluetooth/btusb.c +8 -0
+		},
+	},
+	{}
+};
+
 #define BTUSB_MAX_ISOC_FRAMES	10
 
 #define BTUSB_INTR_RUNNING	0
@@ -2945,6 +2962,9 @@ static int btusb_probe(struct usb_interface *intf,
 	hdev->send   = btusb_send_frame;
 	hdev->notify = btusb_notify;
 
+	if (dmi_check_system(btusb_plat_needs_reset_resume_list))
+		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
+
 #ifdef CONFIG_PM
 	err = btusb_config_oob_wake(hdev);
 	if (err)

drivers/bluetooth/btusb.c static int btusb_probe(struct usb_interface *intf, · line 3054

Quoted 10 lines
drivers/bluetooth/btusb.c +0 -6
@@ -3031,12 +3051,6 @@ 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;
-
-		/* QCA Rome devices lose their updated firmware over suspend,
-		 * but the USB hub doesn't notice any status change.
-		 * explicitly request a device reset on resume.
-		 */
-		interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
 	}

It is all cosmetic. So otherwise this looks good.

Regards

Marcel

maintainer
#4 lore raw

Re: [RFC] Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Hi Hans,

Quoted 63 lines
Quoted 7 lines
Quoted 7 lines

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

Quoted 7 lines
Quoted 6 lines

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

just for the record, can we include the /sys/kernel/debug/usb/devices for that device here.

Will do.

Quoted 30 lines
Quoted 22 lines
Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>

---
drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------

1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +1 -0
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
 *
 */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 384

Quoted 5 lines
drivers/bluetooth/btusb.c +2 -0
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a

Actually “btusb” is a driver name. So “Bluetooth USB modules”

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 386

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.
Quoted 7 lines

Here s/btusb/module/

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 388

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {

I prefer to use _table instead of _list. Also drop the _plat_ part since that seems obvious.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 390

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+	{
+		/* Lenovo yoga 920 */

Use “Yoga" please.

I will fix all of the above.

Quoted 5 lines

And I would include “(QCA Rome device VID:PID)” so that we have a record of some sorts.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = {

Quoted 3 lines
drivers/bluetooth/btusb.c +3 -0
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920”),

No DMI_EXACT_MATCH?

Quoted 7 lines

The DMI data actually has:

"Lenovo YOGA 920-13IKB"

I'm not using DMI_EXACT_MATCH on purpose here, I think Lenovo might change the "-13IKB" part and I don't expect them to fix this bug on newer revisions.

that is fine. What about the “LENOVO” vendor match? Should that be an exact match?

Regards

Marcel

#5 lore raw

Re: [RFC] Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Hi,

Quoted 67 lines · Marcel Holtmann

Hi Hans,

Quoted 65 lines
Quoted 7 lines
Quoted 7 lines

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

Quoted 7 lines
Quoted 6 lines

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

just for the record, can we include the /sys/kernel/debug/usb/devices for that device here.

Will do.

Quoted 30 lines
Quoted 22 lines
Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>

---
drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------

1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +1 -0
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
  *
  */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 384

Quoted 5 lines
drivers/bluetooth/btusb.c +2 -0
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a

Actually “btusb” is a driver name. So “Bluetooth USB modules”

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 386

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.
Quoted 7 lines

Here s/btusb/module/

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 388

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {

I prefer to use _table instead of _list. Also drop the _plat_ part since that seems obvious.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 390

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+	{
+		/* Lenovo yoga 920 */

Use “Yoga" please.

I will fix all of the above.

Quoted 5 lines

And I would include “(QCA Rome device VID:PID)” so that we have a record of some sorts.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = {

Quoted 3 lines
drivers/bluetooth/btusb.c +3 -0
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920”),

No DMI_EXACT_MATCH?

The DMI data actually has:

Quoted 7 lines
Quoted 5 lines

"Lenovo YOGA 920-13IKB"

I'm not using DMI_EXACT_MATCH on purpose here, I think Lenovo might change the "-13IKB" part and I don't expect them to fix this bug on newer revisions.

that is fine. What about the “LENOVO” vendor match? Should that be an exact match?

It could be an exact match, in general I tend to not use DMI_EXACT_MATCH unless necessary though, as vendors sometimes add whitespace padding after the contents. Esp. Asus is known to do this. But if you want me to change it over to DMI_EXACT_MATCH I can do that for the non RFC version which I plan to send tomorrow (I just got test feedback that this version works for the reporter).

Regards,

Hans

maintainer
#6 lore raw

Re: [RFC] Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking

Hi Hans,

Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Quoted 7 lines
Quoted 7 lines

Commit 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA btusb devices. But it turns out that the resume problems are not caused by the QCA Rome chipset, on most platforms it resumes fine. The resume problems are actually a platform problem (likely the platform cutting all power when suspended).

Quoted 7 lines
Quoted 6 lines

The USB_QUIRK_RESET_RESUME quirk also disable runtime suspend, so by matching on usb-ids, we're causing all boards with these chips to use extra power, to fix resume problems which only happen on some boards.

This commit fixes this by applying the quirk based on DMI matching instead of on usb-ids, so that we match the platform and not the chipset.

just for the record, can we include the /sys/kernel/debug/usb/devices for that device here.

Will do.

Quoted 30 lines
Quoted 22 lines
Fixes 61f5acea8737 ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
Cc Brian Norris <[email protected]>
Cc Kai-Heng Feng <[email protected]>

---
drivers/bluetooth/btusb.c | 26 ++++++++++++++++++++------

1 file changed, 20 insertions(+), 6 deletions(-)
drivers/bluetooth/btusb.c +1 -0
index 2a55380ad730..a6023667f3b4 100644
@@ -21,6 +21,7 @@
 *
 */
 
+#include <linux/dmi.h>
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/quirks.h>

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 384

Quoted 5 lines
drivers/bluetooth/btusb.c +2 -0
@@ -379,6 +380,22 @@ static const struct usb_device_id blacklist_table[] = {
 	{ }	/* Terminating entry */
 };
 
+/*
+ * The btusb build into some devices needs to be reset on resume, this is a

Actually “btusb” is a driver name. So “Bluetooth USB modules”

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 386

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ * problem with the platform (likely shutting off all power) not with the
+ * btusb chip itself. So we use a DMI list to match known broken platforms.
Quoted 7 lines

Here s/btusb/module/

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 388

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+ */
+static const struct dmi_system_id btusb_plat_needs_reset_resume_list[] = {

I prefer to use _table instead of _list. Also drop the _plat_ part since that seems obvious.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = { · line 390

Quoted 2 lines
drivers/bluetooth/btusb.c +2 -0
+	{
+		/* Lenovo yoga 920 */

Use “Yoga" please.

I will fix all of the above.

Quoted 5 lines

And I would include “(QCA Rome device VID:PID)” so that we have a record of some sorts.

drivers/bluetooth/btusb.c static const struct usb_device_id blacklist_table[] = {

Quoted 3 lines
drivers/bluetooth/btusb.c +3 -0
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 920”),

No DMI_EXACT_MATCH?

The DMI data actually has:

"Lenovo YOGA 920-13IKB"

I'm not using DMI_EXACT_MATCH on purpose here, I think Lenovo might change the "-13IKB" part and I don't expect them to fix this bug on newer revisions.

Quoted 8 lines
Quoted 1 line

that is fine. What about the “LENOVO” vendor match? Should that be an exact match?

It could be an exact match, in general I tend to not use DMI_EXACT_MATCH unless necessary though, as vendors sometimes add whitespace padding after the contents. Esp. Asus is known to do this. But if you want me to change it over to DMI_EXACT_MATCH I can do that for the non RFC version which I plan to send tomorrow (I just got test feedback that this version works for the reporter).

I just mentioned it since in the hci_bcm.c we used DMI_EXACT_MATCH for the Lenovo hardware.

Regards

Marcel