Skip to content

Commit fc54910

Browse files
jwrdegoedeholtmann
authored andcommitted
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: [email protected] Cc: Jeremy Cline <[email protected]> Suggested-by: Jeremy Cline <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 544a591 commit fc54910

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/bluetooth/btusb.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2852,6 +2852,12 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)
28522852
}
28532853
#endif
28542854

2855+
static void btusb_check_needs_reset_resume(struct usb_interface *intf)
2856+
{
2857+
if (dmi_check_system(btusb_needs_reset_resume_table))
2858+
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2859+
}
2860+
28552861
static int btusb_probe(struct usb_interface *intf,
28562862
const struct usb_device_id *id)
28572863
{
@@ -2974,9 +2980,6 @@ static int btusb_probe(struct usb_interface *intf,
29742980
hdev->send = btusb_send_frame;
29752981
hdev->notify = btusb_notify;
29762982

2977-
if (dmi_check_system(btusb_needs_reset_resume_table))
2978-
interface_to_usbdev(intf)->quirks |= USB_QUIRK_RESET_RESUME;
2979-
29802983
#ifdef CONFIG_PM
29812984
err = btusb_config_oob_wake(hdev);
29822985
if (err)
@@ -3064,6 +3067,7 @@ static int btusb_probe(struct usb_interface *intf,
30643067
data->setup_on_usb = btusb_setup_qca;
30653068
hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
30663069
set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
3070+
btusb_check_needs_reset_resume(intf);
30673071
}
30683072

30693073
#ifdef CONFIG_BT_HCIBTUSB_RTL

0 commit comments

Comments
 (0)