Skip to contentSkip to conversation

toshiba_acpi: Fix USB Sleep and Music always disabled

PATCH Applied Azael Avalos 2 participants 4 messages Sep 9, 2015 – Sep 10, 2015

Subsystems (3)
lore
Share & tools
lore

Azael Avalos

author maintainer
#0 lore raw

PATCH 1/1 toshiba_acpi: Fix USB Sleep and Music always disabled

Commit e1a949c1b988 ("toshiba_acpi: Refactor *{get, set} functions return value") made changes on the return type of the HCI/SCI functions, but a typo on the USB Sleep and Music code is always reporting non existent support for such feature.

This patch corrects the typo, changing an assignment to a comparison, making the laptops with actual support for such feature to work again.

---
Darren,

Hopefully this patch can go into one of the 4.3 RCs, as the changes are there and to avoid shipping a broken feature support.

 drivers/platform/x86/toshiba_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/toshiba_acpi.c +1 -1
index 6740c51..c434b53 100644
@@ -938,7 +938,7 @@ static int toshiba_usb_sleep_music_get(struct toshiba_acpi_dev *dev, u32 *state)
 	else if (result == TOS_NOT_SUPPORTED)
 		return -ENODEV;
 
-	return result = TOS_SUCCESS ? 0 : -EIO;
+	return result == TOS_SUCCESS ? 0 : -EIO;
 }
 
 static int toshiba_usb_sleep_music_set(struct toshiba_acpi_dev *dev, u32 state)
Signature · 1 line
2.5.1
author maintainer
#1 lore raw

PATCH 1/1 toshiba_acpi: Fix hotkeys registration on some toshiba models

Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function for keymap choosing") changed the *setup_keyboard function to query for the Hotkey Event Type to help choose the correct keymap, but turns out that here are certain Toshiba models out there not implementing this feature, and thus, failing to continue the input device registration and leaving such laptops without hotkey support.

This patch changes such check, and instead of returning an error if the Hotkey Event Type is not present, we simply inform userspace about it, changing the message printed from err to notice, making the function responsible for registering the input device to continue.

This issue was found on a Toshiba Portege Z30-B, but there might be some other models out there affected by this regression as well.

---
 drivers/platform/x86/toshiba_acpi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/platform/x86/toshiba_acpi.c +3 -5
index c434b53..f2372f4 100644
@@ -2398,11 +2398,9 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 	if (error)
 		return error;
 
-	error = toshiba_hotkey_event_type_get(dev, &events_type);
-	if (error) {
-		pr_err("Unable to query Hotkey Event Type\n");
-		return error;
-	}
+	if (toshiba_hotkey_event_type_get(dev, &events_type))
+		pr_notice("Unable to query Hotkey Event Type\n");
+
 	dev->hotkey_event_type = events_type;
 
 	dev->hotkey_dev = input_allocate_device();
Signature · 1 line
2.5.1
Applied
#2 lore raw

Re: [PATCH] toshiba_acpi: Fix hotkeys registration on some toshiba models

Quoted 12 lines · Azael Avalos

Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function for keymap choosing") changed the *setup_keyboard function to query for the Hotkey Event Type to help choose the correct keymap, but turns out that here are certain Toshiba models out there not implementing this feature, and thus, failing to continue the input device registration and leaving such laptops without hotkey support.

This patch changes such check, and instead of returning an error if the Hotkey Event Type is not present, we simply inform userspace about it, changing the message printed from err to notice, making the function responsible for registering the input device to continue.

Quoted 5 lines

This issue was found on a Toshiba Portege Z30-B, but there might be some other models out there affected by this regression as well.

Queued for 4.3, thanks!

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center
Applied
#3 lore raw
In reply to Azael Avalos
Quoted 8 lines · Azael Avalos

Commit e1a949c1b988 ("toshiba_acpi: Refactor *{get, set} functions return value") made changes on the return type of the HCI/SCI functions, but a typo on the USB Sleep and Music code is always reporting non existent support for such feature.

This patch corrects the typo, changing an assignment to a comparison, making the laptops with actual support for such feature to work again.

Quoted 6 lines

---
Darren,

Hopefully this patch can go into one of the 4.3 RCs, as the changes are there and to avoid shipping a broken feature support.

Queued for 4.3, thanks Azael.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center