Skip to content

Commit 4aa9ef8

Browse files
jwrdegoedegregkh
authored andcommitted
Bluetooth: btusb: Only check needs_reset_resume DMI table for QCA rome chipsets
commit fc54910 upstream. 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: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4fcd033 commit 4aa9ef8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎drivers/bluetooth/btusb.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,6 +2902,12 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
29022902
}
29032903
#endif
29042904

2905+
static void btusb_check_needs_reset_resume(struct usb_interface *intf)
2906+
{
2907+
if (dmi_check_system(btusb_needs_reset_resume_table))
2908+
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2909+
}
2910+
29052911
static int btusb_probe(struct usb_interface *intf,
29062912
const struct usb_device_id *id)
29072913
{
@@ -3037,9 +3043,6 @@ static int btusb_probe(struct usb_interface *intf,
30373043
hdev->send = btusb_send_frame;
30383044
hdev->notify = btusb_notify;
30393045

3040-
if (dmi_check_system(btusb_needs_reset_resume_table))
3041-
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
3042-
30433046
#ifdef CONFIG_PM
30443047
err = btusb_config_oob_wake(hdev);
30453048
if (err)
@@ -3126,6 +3129,7 @@ static int btusb_probe(struct usb_interface *intf,
31263129
if (id->driver_info & BTUSB_QCA_ROME) {
31273130
data->setup_on_usb = btusb_setup_qca;
31283131
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
3132+
btusb_check_needs_reset_resume(intf);
31293133
}
31303134

31313135
#ifdef CONFIG_BT_HCIBTUSB_RTL

0 commit comments

Comments
 (0)