SRU request for LP#249296

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SRU request for LP#249296

Stefan Bader-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

https://bugs.launchpad.net/cmpc/+bug/249296

SRU justification:

Impact: After suspend the classmate PC will not reboot with any of the present
boot methods, however it will reboot using the ACPI method (although its ACPI
flags clearly deny this).

Fix: The fix backports the ability to use reboot=a on the commandline from
upstream. It adds dmi exception tables to let the classmate use this method
without checking the flags and sets this method as a default for it (also by
dmi matching). So impact for other machines is not expected, since the default
of using the keyboard controller remains.

Testcase: Reboot after suspend/resume on the classmate will hang without this,
otherwise succeed.

- --

When all other means of communication fail, try words!


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIl1deP+TjRTJVqvQRAvSBAKDNqbLZV/3bS2wCGhwIWHvNIDXQUgCgoB9f
es2RcVyyyLZzVXa5gxONqIE=
=NBLF
-----END PGP SIGNATURE-----

From 2679f7d2e709bed1942f90350ca0873adb686224 Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Thu, 31 Jul 2008 17:13:56 -0400
Subject: [PATCH] UBUNTU: SAUCE: Add ACPI reboot support.

OriginalAuthor: [hidden email]
OriginalLocation: http://bugzilla.kernel.org/show_bug.cgi?id=7299
Bug: #249296

This patch consists of three parts:
1. Backport of
   commit 4d3870431d17346c4fdd80e087b7d76f1b5941d5
   Author: Aaron Durbin <[hidden email]>
   Date:   Wed Jul 16 23:27:08 2008 +0200

   Add the ability to reset the machine using the RESET_REG in ACPI's FADTi
   table

   Signed-off-by: Aaron Durbin <[hidden email]>
   Signed-off-by: Andi Kleen <[hidden email]>
   Cc: Len Brown <[hidden email]>
   Cc: Andi Kleen <[hidden email]>
   Signed-off-by: Andrew Morton <[hidden email]>
2. Addition of the dmi whitelist (based on a patch from Yakuki Zhao
3. Backport addition of the reboot=a support and dmi quirks to use this on
   the classmate (reboot=a is upstream in the merged reboot.c).

In the case of the classmate PC all other means of rebooting failed afer
suspend/resume. However the ACPI method works (regardless of the fact that
the FADT flags do not tell so).

Signed-off-by: Stefan Bader <[hidden email]>
---
 arch/x86/kernel/reboot_32.c |   26 ++++++++++++++
 arch/x86/kernel/reboot_64.c |    9 ++++-
 drivers/acpi/Makefile       |    2 +-
 drivers/acpi/reboot.c       |   81 +++++++++++++++++++++++++++++++++++++++++++
 include/acpi/reboot.h       |   10 +++++
 5 files changed, 126 insertions(+), 2 deletions(-)
 create mode 100644 drivers/acpi/reboot.c
 create mode 100644 include/acpi/reboot.h

diff --git a/arch/x86/kernel/reboot_32.c b/arch/x86/kernel/reboot_32.c
index bb1a0f8..e303295 100644
--- a/arch/x86/kernel/reboot_32.c
+++ b/arch/x86/kernel/reboot_32.c
@@ -9,6 +9,7 @@
 #include <linux/ctype.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
+#include <acpi/reboot.h>
 #include <asm/uaccess.h>
 #include <asm/apic.h>
 #include <asm/hpet.h>
@@ -39,6 +40,9 @@ static int __init reboot_setup(char *str)
  case 'c': /* "cold" reboot (with memory testing etc) */
  reboot_mode = 0x0;
  break;
+ case 'a': /* reboot through ACPI BIOS. */
+ reboot_thru_bios = 2;
+ break;
  case 'b': /* "bios" reboot by jumping through the BIOS */
  reboot_thru_bios = 1;
  break;
@@ -76,6 +80,16 @@ __setup("reboot=", reboot_setup);
 /*
  * Some machines require the "reboot=b"  commandline option, this quirk makes that automatic.
  */
+static int __init set_acpi_reboot(const struct dmi_system_id *d)
+{
+ if (!reboot_thru_bios) {
+ printk(KERN_INFO "%s detected. Using ACPI for reboots.\n",
+ d->ident);
+ reboot_thru_bios = 2;
+ }
+ return 0;
+}
+
 static int __init set_bios_reboot(const struct dmi_system_id *d)
 {
  if (!reboot_thru_bios) {
@@ -135,6 +149,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
  },
  },
+ { /* Handle problems with rebooting classmate PC after suspend */
+ .callback = set_acpi_reboot,
+ .ident = "Intel powered classmate PC",
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "Intel powered classmate PC"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Gen 1.5"),
+ },
+ },
  { }
 };
 
@@ -357,6 +380,9 @@ static void native_machine_emergency_restart(void)
  if (efi_enabled)
  efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
 
+ if (reboot_thru_bios == 2)
+ acpi_reboot();
+
  machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
 
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c
index 53620a9..d9c9c48 100644
--- a/arch/x86/kernel/reboot_64.c
+++ b/arch/x86/kernel/reboot_64.c
@@ -9,6 +9,7 @@
 #include <linux/pm.h>
 #include <linux/kdebug.h>
 #include <linux/sched.h>
+#include <acpi/reboot.h>
 #include <asm/io.h>
 #include <asm/delay.h>
 #include <asm/desc.h>
@@ -28,6 +29,7 @@ EXPORT_SYMBOL(pm_power_off);
 
 static long no_idt[3];
 static enum {
+ BOOT_ACPI = 'a',
  BOOT_TRIPLE = 't',
  BOOT_KBD = 'k'
 } reboot_type = BOOT_KBD;
@@ -56,6 +58,7 @@ static int __init reboot_setup(char *str)
  case 't':
  case 'b':
  case 'k':
+ case 'a':
  reboot_type = *str;
  break;
  case 'f':
@@ -146,7 +149,11 @@ void machine_emergency_restart(void)
 
  reboot_type = BOOT_KBD;
  break;
- }      
+ case BOOT_ACPI:
+ reboot_acpi();
+ reboot_type = BOOT_KBD;
+ break;
+ }
  }      
 }
 
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 456446f..945c4cf 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_X86) += blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y += osl.o utils.o \
+obj-y += osl.o utils.o reboot.o\
    dispatcher/ events/ executer/ hardware/ \
    namespace/ parser/ resources/ tables/ \
    utilities/
diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
new file mode 100644
index 0000000..e1097f2
--- /dev/null
+++ b/drivers/acpi/reboot.c
@@ -0,0 +1,81 @@
+#include <linux/pci.h>
+#include <linux/acpi.h>
+#include <acpi/reboot.h>
+#include <linux/dmi.h>
+
+/*
+ * Some systems the have been proved to be able to reboot this way (even if
+ * some fail to claim this in the FADT).
+ */
+static struct dmi_system_id reboot_dmi_whitelist[] = {
+ {
+ .ident = "ASUS M6NE",
+ .matches =  {
+ DMI_MATCH(DMI_BIOS_VERSION,"0208"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"M6Ne"),
+ },
+ },
+ {
+ .ident = "Intel powered classmate PC",
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME,
+  "Intel powered classmate PC"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Gen 1.5"),
+ },
+ },
+ {}
+};
+
+void acpi_reboot(void)
+{
+ struct acpi_generic_address *rr;
+ struct pci_bus *bus0;
+ u8 reset_value;
+ unsigned int devfn;
+
+ if (acpi_disabled)
+ return;
+
+ rr = &acpi_gbl_FADT.reset_register;
+
+ /*
+ * For those systems that have not been whitelisted, check the ACPI
+ * flags and the register layout.
+ */
+ if (!dmi_check_system(reboot_dmi_whitelist)) {
+ /* Is the reset register supported? */
+ if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER))
+ return;
+ /* Is the width and ofset as specified? */
+ if (rr->bit_width != 8 || rr->bit_offset != 0)
+ return;
+ }
+
+ reset_value = acpi_gbl_FADT.reset_value;
+
+ /* The reset register can only exist in I/O, Memory or PCI config space
+ * on a device on bus 0. */
+ switch (rr->space_id) {
+ case ACPI_ADR_SPACE_PCI_CONFIG:
+ /* The reset register can only live on bus 0. */
+ bus0 = pci_find_bus(0, 0);
+ if (!bus0)
+ return;
+ /* Form PCI device/function pair. */
+ devfn = PCI_DEVFN((rr->address >> 32) & 0xffff,
+  (rr->address >> 16) & 0xffff);
+ printk(KERN_DEBUG "Resetting with ACPI PCI RESET_REG.");
+ /* Write the value that resets us. */
+ pci_bus_write_config_byte(bus0, devfn,
+ (rr->address & 0xffff), reset_value);
+ break;
+
+ case ACPI_ADR_SPACE_SYSTEM_MEMORY:
+ case ACPI_ADR_SPACE_SYSTEM_IO:
+ printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
+ acpi_hw_low_level_write(8, reset_value, rr);
+ break;
+ }
+ /* Wait ten seconds */
+ acpi_os_stall(10000000);
+}
diff --git a/include/acpi/reboot.h b/include/acpi/reboot.h
new file mode 100644
index 0000000..e8deae1
--- /dev/null
+++ b/include/acpi/reboot.h
@@ -0,0 +1,10 @@
+#ifndef __ACPI_REBOOT_H
+#define __ACPI_REBOOT_H
+
+#ifdef CONFIG_ACPI
+extern void acpi_reboot(void);
+#else
+static inline void acpi_reboot(void) { }
+#endif
+
+#endif
--
1.5.4.3


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: SRU request for LP#249296

Ben Collins-4
On Mon, 2008-08-04 at 15:24 -0400, Stefan Bader wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> https://bugs.launchpad.net/cmpc/+bug/249296
>
> SRU justification:
>
> Impact: After suspend the classmate PC will not reboot with any of the present
> boot methods, however it will reboot using the ACPI method (although its ACPI
> flags clearly deny this).
>
> Fix: The fix backports the ability to use reboot=a on the commandline from
> upstream. It adds dmi exception tables to let the classmate use this method
> without checking the flags and sets this method as a default for it (also by
> dmi matching). So impact for other machines is not expected, since the default
> of using the keyboard controller remains.
>
> Testcase: Reboot after suspend/resume on the classmate will hang without this,
> otherwise succeed.

Can we split this up then? It will make things easier to push upstream
changes and merge existing patches.


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: SRU request for LP#249296

Stefan Bader-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ben Collins wrote:

> On Mon, 2008-08-04 at 15:24 -0400, Stefan Bader wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> https://bugs.launchpad.net/cmpc/+bug/249296
>>
>> SRU justification:
>>
>> Impact: After suspend the classmate PC will not reboot with any of the present
>> boot methods, however it will reboot using the ACPI method (although its ACPI
>> flags clearly deny this).
>>
>> Fix: The fix backports the ability to use reboot=a on the commandline from
>> upstream. It adds dmi exception tables to let the classmate use this method
>> without checking the flags and sets this method as a default for it (also by
>> dmi matching). So impact for other machines is not expected, since the default
>> of using the keyboard controller remains.
>>
>> Testcase: Reboot after suspend/resume on the classmate will hang without this,
>> otherwise succeed.
>
> Can we split this up then? It will make things easier to push upstream
> changes and merge existing patches.
>
Splitted into 3 parts:
- - Backport ability to reset the machine using the RESET_REG of ACPI
  (Hardy/Intrepid*)
   *Applicable partially to Intrepid, the framework is there but acpi_reboot()
    does nothing and falls back to keyboard method. Commit SHA points to the
    upstream commit that added this
- - SAUCE: Add the ability to whitelist systems to use ACPI reboot
  (Hardy/Intrepid) taken from a proposal of the referenced bug report.
- - SAUCE: Add reboot=a preselection quirk
  (Hardy/Intrepid) This is optional and just selects the right method for
  reboot, adds to the code already in place for Dell.

- --

When all other means of communication fail, try words!


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImK9mP+TjRTJVqvQRAnXlAKDZ6PeygMoR1li9NuOiRv57YlrxAgCg/FEl
k8ZmkWkAU8M0ixfGmpYaS3Y=
=M/rL
-----END PGP SIGNATURE-----

From 216d5a047f02076e065f85bf7baaa025be7a0403 Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Tue, 5 Aug 2008 14:23:14 -0400
Subject: [PATCH] UBUNTU: Backport ability to reset the machine using the RESET_REG of ACPI

OriginalAuthor: Aaron Durbin <[hidden email]>
Bug: #249296

commit 4d3870431d17346c4fdd80e087b7d76f1b5941d5
Author: Aaron Durbin <[hidden email]>
Date:   Wed Jul 16 23:27:08 2008 +0200

Add the ability to reset the machine using the RESET_REG in ACPI's FADT tabl

Signed-off-by: Aaron Durbin <[hidden email]>
Signed-off-by: Andi Kleen <[hidden email]>
Cc: Len Brown <[hidden email]>
Cc: Andi Kleen <[hidden email]>
Signed-off-by: Andrew Morton <[hidden email]>
Signed-off-by: Stefan Bader <[hidden email]>
---
 arch/x86/kernel/reboot_32.c |    7 ++++++
 arch/x86/kernel/reboot_64.c |    9 +++++++-
 drivers/acpi/Makefile       |    2 +-
 drivers/acpi/reboot.c       |   50 +++++++++++++++++++++++++++++++++++++++++++
 include/acpi/reboot.h       |   10 ++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 drivers/acpi/reboot.c
 create mode 100644 include/acpi/reboot.h

diff --git a/arch/x86/kernel/reboot_32.c b/arch/x86/kernel/reboot_32.c
index bb1a0f8..b6a8d1c 100644
--- a/arch/x86/kernel/reboot_32.c
+++ b/arch/x86/kernel/reboot_32.c
@@ -9,6 +9,7 @@
 #include <linux/ctype.h>
 #include <linux/pm.h>
 #include <linux/reboot.h>
+#include <acpi/reboot.h>
 #include <asm/uaccess.h>
 #include <asm/apic.h>
 #include <asm/hpet.h>
@@ -39,6 +40,9 @@ static int __init reboot_setup(char *str)
  case 'c': /* "cold" reboot (with memory testing etc) */
  reboot_mode = 0x0;
  break;
+ case 'a': /* reboot through ACPI BIOS. */
+ reboot_thru_bios = 2;
+ break;
  case 'b': /* "bios" reboot by jumping through the BIOS */
  reboot_thru_bios = 1;
  break;
@@ -357,6 +361,9 @@ static void native_machine_emergency_restart(void)
  if (efi_enabled)
  efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
 
+ if (reboot_thru_bios == 2)
+ acpi_reboot();
+
  machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
 
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c
index 53620a9..d9c9c48 100644
--- a/arch/x86/kernel/reboot_64.c
+++ b/arch/x86/kernel/reboot_64.c
@@ -9,6 +9,7 @@
 #include <linux/pm.h>
 #include <linux/kdebug.h>
 #include <linux/sched.h>
+#include <acpi/reboot.h>
 #include <asm/io.h>
 #include <asm/delay.h>
 #include <asm/desc.h>
@@ -28,6 +29,7 @@ EXPORT_SYMBOL(pm_power_off);
 
 static long no_idt[3];
 static enum {
+ BOOT_ACPI = 'a',
  BOOT_TRIPLE = 't',
  BOOT_KBD = 'k'
 } reboot_type = BOOT_KBD;
@@ -56,6 +58,7 @@ static int __init reboot_setup(char *str)
  case 't':
  case 'b':
  case 'k':
+ case 'a':
  reboot_type = *str;
  break;
  case 'f':
@@ -146,7 +149,11 @@ void machine_emergency_restart(void)
 
  reboot_type = BOOT_KBD;
  break;
- }      
+ case BOOT_ACPI:
+ reboot_acpi();
+ reboot_type = BOOT_KBD;
+ break;
+ }
  }      
 }
 
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 456446f..945c4cf 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -21,7 +21,7 @@ obj-$(CONFIG_X86) += blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y += osl.o utils.o \
+obj-y += osl.o utils.o reboot.o\
    dispatcher/ events/ executer/ hardware/ \
    namespace/ parser/ resources/ tables/ \
    utilities/
diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
new file mode 100644
index 0000000..8a0de95
--- /dev/null
+++ b/drivers/acpi/reboot.c
@@ -0,0 +1,50 @@
+#include <linux/pci.h>
+#include <linux/acpi.h>
+#include <acpi/reboot.h>
+#include <linux/dmi.h>
+
+void acpi_reboot(void)
+{
+ struct acpi_generic_address *rr;
+ struct pci_bus *bus0;
+ u8 reset_value;
+ unsigned int devfn;
+
+ if (acpi_disabled)
+ return;
+
+ rr = &acpi_gbl_FADT.reset_register;
+
+ /* Is the reset register supported? */
+ if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) ||
+    rr->bit_width != 8 || rr->bit_offset != 0)
+ return;
+
+ reset_value = acpi_gbl_FADT.reset_value;
+
+ /* The reset register can only exist in I/O, Memory or PCI config space
+ * on a device on bus 0. */
+ switch (rr->space_id) {
+ case ACPI_ADR_SPACE_PCI_CONFIG:
+ /* The reset register can only live on bus 0. */
+ bus0 = pci_find_bus(0, 0);
+ if (!bus0)
+ return;
+ /* Form PCI device/function pair. */
+ devfn = PCI_DEVFN((rr->address >> 32) & 0xffff,
+  (rr->address >> 16) & 0xffff);
+ printk(KERN_DEBUG "Resetting with ACPI PCI RESET_REG.");
+ /* Write the value that resets us. */
+ pci_bus_write_config_byte(bus0, devfn,
+ (rr->address & 0xffff), reset_value);
+ break;
+
+ case ACPI_ADR_SPACE_SYSTEM_MEMORY:
+ case ACPI_ADR_SPACE_SYSTEM_IO:
+ printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
+ acpi_hw_low_level_write(8, reset_value, rr);
+ break;
+ }
+ /* Wait ten seconds */
+ acpi_os_stall(10000000);
+}
diff --git a/include/acpi/reboot.h b/include/acpi/reboot.h
new file mode 100644
index 0000000..e8deae1
--- /dev/null
+++ b/include/acpi/reboot.h
@@ -0,0 +1,10 @@
+#ifndef __ACPI_REBOOT_H
+#define __ACPI_REBOOT_H
+
+#ifdef CONFIG_ACPI
+extern void acpi_reboot(void);
+#else
+static inline void acpi_reboot(void) { }
+#endif
+
+#endif
--
1.5.4.3


From c666f29a199f41e65c0a688cb11e8a4b772b462e Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Tue, 5 Aug 2008 14:28:10 -0400
Subject: [PATCH] UBUNTU: SAUCE: Add the ability to whitelist systems to use ACPI reboot

OriginalAuthor: [hidden email]
OriginalLocation: http://bugzilla.kernel.org/show_bug.cgi?id=7299
Bug: #249296

Some systems can be rebooted with the ACPI method although the checks/flags
would not indicate this. This patch adds a whitelist mechanism to the ACPI
reboot code and adds the classmate PC.
To use the ACPI method it is still necessary to specify reboot=a on the
kernel command line.

Signed-off-by: Stefan Bader <[hidden email]>
---
 drivers/acpi/reboot.c |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/reboot.c b/drivers/acpi/reboot.c
index 8a0de95..e1097f2 100644
--- a/drivers/acpi/reboot.c
+++ b/drivers/acpi/reboot.c
@@ -3,6 +3,29 @@
 #include <acpi/reboot.h>
 #include <linux/dmi.h>
 
+/*
+ * Some systems the have been proved to be able to reboot this way (even if
+ * some fail to claim this in the FADT).
+ */
+static struct dmi_system_id reboot_dmi_whitelist[] = {
+ {
+ .ident = "ASUS M6NE",
+ .matches =  {
+ DMI_MATCH(DMI_BIOS_VERSION,"0208"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"M6Ne"),
+ },
+ },
+ {
+ .ident = "Intel powered classmate PC",
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME,
+  "Intel powered classmate PC"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Gen 1.5"),
+ },
+ },
+ {}
+};
+
 void acpi_reboot(void)
 {
  struct acpi_generic_address *rr;
@@ -15,10 +38,18 @@ void acpi_reboot(void)
 
  rr = &acpi_gbl_FADT.reset_register;
 
- /* Is the reset register supported? */
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) ||
-    rr->bit_width != 8 || rr->bit_offset != 0)
- return;
+ /*
+ * For those systems that have not been whitelisted, check the ACPI
+ * flags and the register layout.
+ */
+ if (!dmi_check_system(reboot_dmi_whitelist)) {
+ /* Is the reset register supported? */
+ if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER))
+ return;
+ /* Is the width and ofset as specified? */
+ if (rr->bit_width != 8 || rr->bit_offset != 0)
+ return;
+ }
 
  reset_value = acpi_gbl_FADT.reset_value;
 
--
1.5.4.3


From f835cbef8193556dd5fafb0b56eff8a07a069335 Mon Sep 17 00:00:00 2001
From: Stefan Bader <[hidden email]>
Date: Tue, 5 Aug 2008 14:35:26 -0400
Subject: [PATCH] UBUNTU: SAUCE: Add reboot=a preselection quirk

Bug: #249296

This lets systems automatically select ACPI reboot method based on a DMI match.

Signed-off-by: Stefan Bader <[hidden email]>
---
 arch/x86/kernel/reboot_32.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot_32.c b/arch/x86/kernel/reboot_32.c
index b6a8d1c..4ba7bcd 100644
--- a/arch/x86/kernel/reboot_32.c
+++ b/arch/x86/kernel/reboot_32.c
@@ -78,6 +78,20 @@ __setup("reboot=", reboot_setup);
  */
 
 /*
+ * Some machines require the "reboot=a"  commandline option, this quirk makes
+ * that automatic.
+ */
+static int __init set_acpi_reboot(const struct dmi_system_id *d)
+{
+ if (!reboot_thru_bios) {
+ printk(KERN_INFO "%s detected. Using ACPI for reboots.\n",
+ d->ident);
+ reboot_thru_bios = 2;
+ }
+ return 0;
+}
+
+/*
  * Some machines require the "reboot=b"  commandline option, this quirk makes that automatic.
  */
 static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -139,6 +153,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
  },
  },
+ { /* Handle problems with rebooting classmate PC after suspend */
+ .callback = set_acpi_reboot,
+ .ident = "Intel powered classmate PC",
+ .matches = {
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "Intel powered classmate PC"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Gen 1.5"),
+ },
+ },
  { }
 };
 
--
1.5.4.3


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: SRU request for LP#249296

Ben Collins-4
On Tue, 2008-08-05 at 15:52 -0400, Stefan Bader wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ben Collins wrote:
> > On Mon, 2008-08-04 at 15:24 -0400, Stefan Bader wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> https://bugs.launchpad.net/cmpc/+bug/249296
> >>
> >> SRU justification:
> >>
> >> Impact: After suspend the classmate PC will not reboot with any of the present
> >> boot methods, however it will reboot using the ACPI method (although its ACPI
> >> flags clearly deny this).
> >>
> >> Fix: The fix backports the ability to use reboot=a on the commandline from
> >> upstream. It adds dmi exception tables to let the classmate use this method
> >> without checking the flags and sets this method as a default for it (also by
> >> dmi matching). So impact for other machines is not expected, since the default
> >> of using the keyboard controller remains.
> >>
> >> Testcase: Reboot after suspend/resume on the classmate will hang without this,
> >> otherwise succeed.
> >
> > Can we split this up then? It will make things easier to push upstream
> > changes and merge existing patches.
> >
>
> Splitted into 3 parts:
> - - Backport ability to reset the machine using the RESET_REG of ACPI
>   (Hardy/Intrepid*)
>    *Applicable partially to Intrepid, the framework is there but acpi_reboot()
>     does nothing and falls back to keyboard method. Commit SHA points to the
>     upstream commit that added this
> - - SAUCE: Add the ability to whitelist systems to use ACPI reboot
>   (Hardy/Intrepid) taken from a proposal of the referenced bug report.
> - - SAUCE: Add reboot=a preselection quirk
>   (Hardy/Intrepid) This is optional and just selects the right method for
>   reboot, adds to the code already in place for Dell.

ACK on all three. Thanks for the breakdown.

> - --
>
> When all other means of communication fail, try words!
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFImK9mP+TjRTJVqvQRAnXlAKDZ6PeygMoR1li9NuOiRv57YlrxAgCg/FEl
> k8ZmkWkAU8M0ixfGmpYaS3Y=
> =M/rL
> -----END PGP SIGNATURE-----


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team