Skip to contentSkip to conversation

Fix reboot regression on Acer Aspire One AOA110

PATCH RESEND In review Vasily Khoruzhick 4 participants 7 messages Nov 2, 2011 – Dec 5, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 Fix reboot regression on Acer Aspire One AOA110

From: Uroš Vampl <[email protected]>

Starting with kernel 3.0, my Acer Aspire One AOA110 hangs on reboot. Doing an internet search, I found that in git commit b49c78d4827be8d7e67e5b94adac6b30a4a9ad14 the machine was made to reboot with the bios method, but it does not work on most (all?) AOA110s.

This patch introduces new quirks section for machines that only reboot with the kbd method and put the Aspire One into it.

---
 arch/x86/kernel/reboot.c |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)
arch/x86/kernel/reboot.c +29 -4
index e334be1..f4544b1 100644
@@ -294,8 +294,33 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),
 		},
 	},
+	{ }
+};
+
+static int __init reboot_init(void)
+{
+	dmi_check_system(reboot_dmi_table);
+	return 0;
+}
+core_initcall(reboot_init);
+
+/*
+ * Some machines require the "reboot=k" commandline option,
+ * this quirk makes that automatic.
+ */
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_KBD) {
+		reboot_type = BOOT_KBD;
+		printk(KERN_INFO "%s series board detected. "
+			"Selecting KBD-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
+static struct dmi_system_id __initdata kbd_reboot_dmi_table[] = {
 	{ /* Handle reboot issue on Acer Aspire one */
-		.callback = set_bios_reboot,
+		.callback = set_kbd_reboot,
 		.ident = "Acer Aspire One A110",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
@@ -305,12 +330,12 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{ }
 };
 
-static int __init reboot_init(void)
+static int __init kbd_reboot_init(void)
 {
-	dmi_check_system(reboot_dmi_table);
+	dmi_check_system(kbd_reboot_dmi_table);
 	return 0;
 }
-core_initcall(reboot_init);
+core_initcall(kbd_reboot_init);
 
 extern const unsigned char machine_real_restart_asm[];
 extern const u64 machine_real_restart_gdt[3];
Signature · 1 line
1.7.7.1
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vasily" == Vasily Khoruzhick <[email protected]> writes:

Vasily> From: Uroš Vampl <[email protected]> Starting with Vasily> kernel 3.0, my Acer Aspire One AOA110 hangs on reboot. Doing Vasily> an internet search, I found that in git commit Vasily> b49c78d4827be8d7e67e5b94adac6b30a4a9ad14 the machine was made Vasily> to reboot with the bios method, but it does not work on most Vasily> (all?) AOA110s.

That change was made in July to fix the broken ACPI reboot method. It certainly works on my AOA110. What BIOS do you have installed? (although looking at what's been published, I can't see any booting problems mentioned in the BIOS changelogs).

Vasily> This patch introduces new quirks section for machines that Vasily> only reboot with the kbd method and put the Aspire One into Vasily> it.

You don't need yet another table, just change the callback.

Try this:

arch/x86/kernel/reboot.c +11 -2
Index: linux-2.6/arch/x86/kernel/reboot.c
===================================================================
@@ -124,7 +124,7 @@
  */
 
 /*
- * Some machines require the "reboot=b"  commandline option,
+ * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
 static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -136,6 +136,15 @@
 	return 0;
 }
 
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_KBD) {
+		reboot_type = BOOT_KBD;
+		printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
 static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{	/* Handle problems with rebooting on Dell E520's */
 		.callback = set_bios_reboot,
@@ -295,7 +304,7 @@
 		},
 	},
 	{ /* Handle reboot issue on Acer Aspire one */
-		.callback = set_bios_reboot,
+		.callback = set_kbd_reboot,
 		.ident = "Acer Aspire One A110",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),

--
Dr Peter Chubb peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die

#2 lore raw
Quoted 4 lines · Peter Chubb

That change was made in July to fix the broken ACPI reboot method. It certainly works on my AOA110. What BIOS do you have installed? (although looking at what's been published, I can't see any booting problems mentioned in the BIOS changelogs).

v0.3310 from Acer site. With BIOS reboot method AOA110 just hangs with black screeen on reboot.

I'm not the only one who has this problem, take a look at this link:
https://bbs.archlinux.org/viewtopic.php?id=124136

Quoted 4 lines

You don't need yet another table, just change the callback.

Try this:

Sure, this patch should work. Will test tonight.

Regards
Vasily

Quoted 42 lines

Index: linux-2.6/arch/x86/kernel/reboot.c
===================================================================

arch/x86/kernel/reboot.c +11 -3
@@ -124,7 +124,7 @@
  */
 
 /*
- * Some machines require the "reboot=b"  commandline option,
+ * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
 static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -136,6 +136,15 @@
 	return 0;
 }
 
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_KBD) {
+		reboot_type = BOOT_KBD;
+		printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
 static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{	/* Handle problems with rebooting on Dell E520's */
 		.callback = set_bios_reboot,
@@ -295,7 +304,7 @@
 		},
 	},
 	{ /* Handle reboot issue on Acer Aspire one */
-		.callback = set_bios_reboot,
+		.callback = set_kbd_reboot,
 		.ident = "Acer Aspire One A110",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
--

Dr Peter Chubb peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die

#3 lore raw
In reply to Peter Chubb
Quoted 9 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vasily" == Vasily Khoruzhick <[email protected]> writes:

Vasily> From: Uroš Vampl <[email protected]> Starting with Vasily> kernel 3.0, my Acer Aspire One AOA110 hangs on reboot. Doing Vasily> an internet search, I found that in git commit Vasily> b49c78d4827be8d7e67e5b94adac6b30a4a9ad14 the machine was made Vasily> to reboot with the bios method, but it does not work on most Vasily> (all?) AOA110s.

Quoted 4 lines

That change was made in July to fix the broken ACPI reboot method. It certainly works on my AOA110. What BIOS do you have installed? (although looking at what's been published, I can't see any booting problems mentioned in the BIOS changelogs).

My bios is v0.3309. An unpatched kernel will hang on a black screen at reboot, the only way out is holding the power button for 5 seconds to turn the machine off.

Quoted 9 lines

Vasily> This patch introduces new quirks section for machines that Vasily> only reboot with the kbd method and put the Aspire One into Vasily> it.

You don't need yet another table, just change the callback.

Try this:

Yes, this works too.

Regards,
Uroš

Quoted 43 lines

Index: linux-2.6/arch/x86/kernel/reboot.c
===================================================================

arch/x86/kernel/reboot.c +11 -3
@@ -124,7 +124,7 @@
  */
 
 /*
- * Some machines require the "reboot=b"  commandline option,
+ * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
 static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -136,6 +136,15 @@
 	return 0;
 }
 
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_KBD) {
+		reboot_type = BOOT_KBD;
+		printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
 static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{	/* Handle problems with rebooting on Dell E520's */
 		.callback = set_bios_reboot,
@@ -295,7 +304,7 @@
 		},
 	},
 	{ /* Handle reboot issue on Acer Aspire one */
-		.callback = set_bios_reboot,
+		.callback = set_kbd_reboot,
 		.ident = "Acer Aspire One A110",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
--

Dr Peter Chubb peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die

author
#5 lore raw
In reply to Peter Chubb

2011/11/3 Peter Chubb <[email protected]>:

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vasily" == Vasily Khoruzhick <[email protected]> writes:

Vasily> From: Uroš Vampl <[email protected]> Starting with Vasily> kernel 3.0, my Acer Aspire One AOA110 hangs on reboot. Doing Vasily> an internet search, I found that in git commit Vasily> b49c78d4827be8d7e67e5b94adac6b30a4a9ad14 the machine was made Vasily> to reboot with the bios method, but it does not work on most Vasily> (all?) AOA110s.

That change was made in July to fix the broken ACPI reboot method.  It certainly works on my AOA110.  What BIOS do you have installed? (although looking at what's been published, I can't see any booting problems mentioned in the BIOS changelogs).

Quoted 8 lines

Vasily> This patch introduces new quirks section for machines that Vasily> only reboot with the kbd method and put the Aspire One into Vasily> it.

You don't need yet another table, just change the callback.

Try this:

Any chance to get this patch merged? Would be nice to see it in stable aswell.

Regards
Vasily

Quoted 43 lines

Index: linux-2.6/arch/x86/kernel/reboot.c
===================================================================

arch/x86/kernel/reboot.c  2011-11-03 11:54:12.487901547 +1100 renamed from arch/x86/kernel/reboot.c     2011-10-31 14:35:50.105623537 +1100 +10 -1
@@ -124,7 +124,7 @@
  */
 
  /*
- * Some machines require the "reboot=b"  commandline option,
+ * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
  static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -136,6 +136,15 @@
        return 0;
  }
 
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+       if (reboot_type != BOOT_KBD) {
+               reboot_type = BOOT_KBD;
+               printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboots.\n", d->ident);
+       }
+       return 0;
+}
+
  static struct dmi_system_id __initdata reboot_dmi_table[] = {

       {       /* Handle problems with rebooting on Dell E520's */ .callback = set_bios_reboot,

arch/x86/kernel/reboot.c  2011-11-03 11:54:12.487901547 +1100 renamed from arch/x86/kernel/reboot.c     2011-10-31 14:35:50.105623537 +1100 +0 -0
@@ -295,7 +304,7 @@
                },
        },

       { /* Handle reboot issue on Acer Aspire one */
-               .callback = set_bios_reboot,
+               .callback = set_kbd_reboot,
               .ident = "Acer Aspire One A110",
               .matches = {
                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
--
Dr Peter Chubb                                  peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au               ERTOS within National ICT Australia All things shall perish from under the sky/Music alone shall live, never to die

#6 lore raw
In reply to Peter Chubb
Quoted 53 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vasily" == Vasily Khoruzhick <[email protected]> writes:

Vasily> From: Uroš Vampl <[email protected]> Starting with Vasily> kernel 3.0, my Acer Aspire One AOA110 hangs on reboot. Doing Vasily> an internet search, I found that in git commit Vasily> b49c78d4827be8d7e67e5b94adac6b30a4a9ad14 the machine was made Vasily> to reboot with the bios method, but it does not work on most Vasily> (all?) AOA110s.

That change was made in July to fix the broken ACPI reboot method. It certainly works on my AOA110. What BIOS do you have installed? (although looking at what's been published, I can't see any booting problems mentioned in the BIOS changelogs).

Vasily> This patch introduces new quirks section for machines that Vasily> only reboot with the kbd method and put the Aspire One into Vasily> it.

You don't need yet another table, just change the callback.

Try this:

Index: linux-2.6/arch/x86/kernel/reboot.c
===================================================================

arch/x86/kernel/reboot.c +10 -1
@@ -124,7 +124,7 @@
  */
 
 /*
- * Some machines require the "reboot=b"  commandline option,
+ * Some machines require the "reboot=b" or "reboot=k"  commandline options,
  * this quirk makes that automatic.
  */
 static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -136,6 +136,15 @@
 	return 0;
 }
 
+static int __init set_kbd_reboot(const struct dmi_system_id *d)
+{
+	if (reboot_type != BOOT_KBD) {
+		reboot_type = BOOT_KBD;
+		printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboots.\n", d->ident);
+	}
+	return 0;
+}
+
 static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{	/* Handle problems with rebooting on Dell E520's */
 		.callback = set_bios_reboot,

arch/x86/kernel/reboot.c line 310

Quoted 8 lines
arch/x86/kernel/reboot.c +1 -1
@@ -295,7 +304,7 @@
 		},
 	},
 	{ /* Handle reboot issue on Acer Aspire one */
-		.callback = set_bios_reboot,
+		.callback = set_kbd_reboot,
 		.ident = "Acer Aspire One A110",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),

Looks like this patch worked fine for everyone affected?

If yes then please resend it with a Signed-off-by, and with the proper Reported-by and Tested-by tags.

Thanks,

Ingo