platform/x86: acer-wmi: Keep Bluetooth powered on Aspire E5-573
Subsystems (2)
PATCH 1/1 platform/x86: acer-wmi: Keep Bluetooth powered on Aspire E5-573
The SMBIOS type AAh table of the Aspire E5-573 reports a communication button bitmap of 0x1 (WiFi only), although the laptop has internal Bluetooth.
wmid3_set_device_status() reads the device states using this bitmap and writes the result back, which loses the Bluetooth bit. Any write to the acer-wireless rfkill device therefore powers Bluetooth off, even if the WiFi state does not change. Userspace does such writes during boot, and Bluetooth cannot be turned back on as it has no rfkill device.
Add a quirk that adds Bluetooth to the bitmap and to the capabilities.
Tested on BIOS V1.37 with an Intel 8260 card (USB 8087:0a2b) replacing the original one: Bluetooth survives boot and acer-wireless writes, and the new acer-bluetooth rfkill device blocks and unblocks it.
---
Reproducer without this patch:
# rfkill unblock <index of acer-wireless> usb 1-5: USB disconnect, device number 6
Runtime-tested with the same change on v7.2.11; only build-tested on for-next. Not tested with the laptop's original card.
https://bugzilla.kernel.org/show_bug.cgi?id=190641 reports the same symptom on an E5-573G with its original card. I left that model out because I have no hardware to test it.
drivers/platform/x86/acer-wmi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/platform/x86/acer-wmi.c +20 -0
@@ -406,6 +406,7 @@ struct quirk_entry {bool hwmon;bool platform_profile;bool pwm; +bool commun_bluetooth; };static struct quirk_entry *quirks;
@@ -430,6 +431,11 @@ static void __init set_quirks(void)if (quirks->pwm) interface->capability |=ACER_CAP_PWM ; + +if (quirks->commun_bluetooth) { + commun_func_bitmap |=ACER_WMID3_GDS_BLUETOOTH ; + interface->capability |=ACER_CAP_BLUETOOTH ; + } }static int __init dmi_matched (const struct dmi_system_id *dmi)
@@ -454,6 +460,11 @@ static struct quirk_entry quirk_acer_aspire_1520 = { .brightness = -1, }; +/* The type AAh table omits the internal Bluetooth device */ +static struct quirk_entry quirk_acer_aspire_e5_573 = { + .commun_bluetooth = true, +}; +static struct quirk_entry quirk_acer_aspire_a315_58g = { .hwmon = true, };
@@ -663,6 +674,15 @@ static const struct dmi_system_id acer_quirks[] __initconst = { }, .driver_data = &quirk_acer_aspire_a315_58g, }, + { + .callback = dmi_matched, + .ident = "Acer Aspire E5-573", + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Aspire E5-573"), + }, + .driver_data = &quirk_acer_aspire_e5_573, + }, { .callback = dmi_matched, .ident = "Acer TravelMate 2490",
Signature · 1 line
2.56.0
Ilpo Järvinen
maintainerQuoted 11 lines · Pedro Caldeira
The SMBIOS type AAh table of the Aspire E5-573 reports a communication button bitmap of
0x1(WiFi only), although the laptop has internal Bluetooth.
wmid3_set_device_status()reads the device states using this bitmap and writes the result back, which loses the Bluetooth bit. Any write to the acer-wireless rfkill device therefore powers Bluetooth off, even if the WiFi state does not change. Userspace does such writes during boot, and Bluetooth cannot be turned back on as it has no rfkill device.[...]
Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also fixes are mostly routed through for-next unless the fix is for a commit introduced in the most recent cycle or is clearly a regression fix.
The list of commits applied:
[1/1] platform/x86: acer-wmi: Keep Bluetooth powered on Aspire E5-573
commit: 9b5a2d0e91c806dae2001c029c77c4228223c2dd
--
i.