public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* ACPI patches for 2.6.32-rc8
@ 2009-11-25  6:11 Len Brown
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi

A few patches more for this release...
Please speak up if any look wrong or if we missed any.

thanks,
Len Brown, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700
  2009-11-25  6:11 ACPI patches for 2.6.32-rc8 Len Brown
@ 2009-11-25  6:11 ` Len Brown
  2009-11-25  6:11   ` [PATCH 2/6] ACPICA: Silence the warning about _BIF returning the buffer Len Brown
                     ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi; +Cc: Len Brown

From: Len Brown <len.brown@intel.com>

...else ACPI thermal controls fail after resume.

http://bugzilla.kernel.org/show_bug.cgi?id=13745

Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/sleep.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 4cc1b81..5f2c379 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -430,6 +430,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
 	},
 	{
 	.callback = init_set_sci_en_on_resume,
+	.ident = "Hewlett-Packard Compaq Presario C700 Notebook PC",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Compaq Presario C700 Notebook PC"),
+		},
+	},
+	{
+	.callback = init_set_sci_en_on_resume,
 	.ident = "Hewlett-Packard Compaq Presario CQ40 Notebook PC",
 	.matches = {
 		DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/6] ACPICA: Silence the warning about _BIF returning the buffer
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
@ 2009-11-25  6:11   ` Len Brown
  2009-11-25  6:11   ` [PATCH 3/6] ACPI: Add Thinkpad T400, T500 to OSI(Linux) white-list Len Brown
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi; +Cc: Alexey Starikovskiy, Len Brown

From: Alexey Starikovskiy <astarikovskiy@suse.de>

_BIF was returning buffer instead of a string since day 1 of ACPI.
Adding a warning for that is noble, but people don't like
when someone cries wolf in a production system.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14379
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/acpica/acpredef.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index cd80d1d..57bdaf6 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -203,8 +203,9 @@ static const union acpi_predefined_info predefined_names[] =
 	{{"_BCT", 1, ACPI_RTYPE_INTEGER}},
 	{{"_BDN", 0, ACPI_RTYPE_INTEGER}},
 	{{"_BFS", 1, 0}},
-	{{"_BIF", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (9 Int),(4 Str) */
-			  {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 9, ACPI_RTYPE_STRING}, 4,0}},
+	{{"_BIF", 0, ACPI_RTYPE_PACKAGE} }, /* Fixed-length (9 Int),(4 Str/Buf) */
+			  {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 9,
+			     ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER}, 4, 0} },
 
 	{{"_BIX", 0, ACPI_RTYPE_PACKAGE}},	/* Fixed-length (16 Int),(4 Str) */
 	{{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING}, 4,
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/6] ACPI: Add Thinkpad T400, T500 to OSI(Linux) white-list
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
  2009-11-25  6:11   ` [PATCH 2/6] ACPICA: Silence the warning about _BIF returning the buffer Len Brown
@ 2009-11-25  6:11   ` Len Brown
  2009-11-25  6:11   ` [PATCH 4/6] thinkpad-acpi: fix sign of ERESTARTSYS return Len Brown
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi; +Cc: Jerone Young, Len Brown

From: Jerone Young <jerone.young@canonical.com>

acpi_osi=Linux helps the mute button work properly by sending Linux
a mute key press.

http://bugzilla.kernel.org/show_bug.cgi?id=13934

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/blacklist.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index e56b2a7..23e5a05 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -224,6 +224,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 	 * _OSI(Linux) helps sound
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"),
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"),
+	 * T400, T500
 	 * _OSI(Linux) has Linux specific hooks
 	 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 	 * _OSI(Linux) is a NOP:
@@ -254,6 +255,22 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
 		},
 	},
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Lenovo ThinkPad T400",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T400"),
+		},
+	},
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Lenovo ThinkPad T500",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T500"),
+		},
+	},
 	{}
 };
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/6] thinkpad-acpi: fix sign of ERESTARTSYS return
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
  2009-11-25  6:11   ` [PATCH 2/6] ACPICA: Silence the warning about _BIF returning the buffer Len Brown
  2009-11-25  6:11   ` [PATCH 3/6] ACPI: Add Thinkpad T400, T500 to OSI(Linux) white-list Len Brown
@ 2009-11-25  6:11   ` Len Brown
  2009-11-25  6:11   ` [PATCH 5/6] thinkpad-acpi: fix detection of old ThinkPads Len Brown
  2009-11-25  6:12   ` [PATCH 6/6] acerhdf: return temperature in milidegree instead of degree Len Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi; +Cc: Roel Kluin, Andrew Morton, stable, Len Brown

From: Roel Kluin <roel.kluin@gmail.com>

The returned error should be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/platform/x86/thinkpad_acpi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index d93108d..03c0a56 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6313,7 +6313,7 @@ static int brightness_write(char *buf)
 	 * Doing it this way makes the syscall restartable in case of EINTR
 	 */
 	rc = brightness_set(level);
-	return (rc == -EINTR)? ERESTARTSYS : rc;
+	return (rc == -EINTR)? -ERESTARTSYS : rc;
 }
 
 static struct ibm_struct brightness_driver_data = {
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/6] thinkpad-acpi: fix detection of old ThinkPads
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
                     ` (2 preceding siblings ...)
  2009-11-25  6:11   ` [PATCH 4/6] thinkpad-acpi: fix sign of ERESTARTSYS return Len Brown
@ 2009-11-25  6:11   ` Len Brown
  2009-11-25  6:12   ` [PATCH 6/6] acerhdf: return temperature in milidegree instead of degree Len Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:11 UTC (permalink / raw)
  To: linux-acpi; +Cc: Henrique de Moraes Holschuh, Andrew Morton, Len Brown

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

There is a problem in the quirk tables used by tpacpi_is_fw_known() and
tpacpi_check_outdated_fw(), which causes outdated BIOSes that are lacking
the EC firmware ID DMI field to never match.

This breaks module loading on, e.g.  a T23 with outdated BIOS, and the
module will refuse to load unless the "force_load=1" parameter is given.

Fix the quirk tables so that they can also match the outdated BIOSes,
which in turn will both fix the module loading, and also warn the user
that he is using outdated firmware and should upgrade.

This fixes a serious regression, introduced by commit
e675abafcc0df38125e6e94a9ba91c92fe774f52, "thinkpad-acpi: be more strict
when detecting a ThinkPad".

http://bugzilla.kernel.org/show_bug.cgi?id=14597

Reported-by: Paul Kimoto <kimoto@lightlink.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Tested-by: Paul Kimoto <kimoto@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/platform/x86/thinkpad_acpi.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 03c0a56..a848c7e 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1680,36 +1680,48 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv)
 			  | (__bv1) << 8 | (__bv2) }
 
 #define TPV_Q_X(__v, __bid1, __bid2, __bv1, __bv2,	\
-		__eid1, __eid2, __ev1, __ev2)		\
+		__eid, __ev1, __ev2)			\
 	{ .vendor	= (__v),			\
 	  .bios		= TPID(__bid1, __bid2),		\
-	  .ec		= TPID(__eid1, __eid2),		\
+	  .ec		= __eid,			\
 	  .quirks	= (__ev1) << 24 | (__ev2) << 16 \
 			  | (__bv1) << 8 | (__bv2) }
 
 #define TPV_QI0(__id1, __id2, __bv1, __bv2) \
 	TPV_Q(PCI_VENDOR_ID_IBM, __id1, __id2, __bv1, __bv2)
 
+/* Outdated IBM BIOSes often lack the EC id string */
 #define TPV_QI1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \
 	TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, 	\
-		__bv1, __bv2, __id1, __id2, __ev1, __ev2)
+		__bv1, __bv2, TPID(__id1, __id2),	\
+		__ev1, __ev2),				\
+	TPV_Q_X(PCI_VENDOR_ID_IBM, __id1, __id2, 	\
+		__bv1, __bv2, TPACPI_MATCH_UNKNOWN,	\
+		__ev1, __ev2)
 
+/* Outdated IBM BIOSes often lack the EC id string */
 #define TPV_QI2(__bid1, __bid2, __bv1, __bv2,		\
 		__eid1, __eid2, __ev1, __ev2) 		\
 	TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, 	\
-		__bv1, __bv2, __eid1, __eid2, __ev1, __ev2)
+		__bv1, __bv2, TPID(__eid1, __eid2),	\
+		__ev1, __ev2),				\
+	TPV_Q_X(PCI_VENDOR_ID_IBM, __bid1, __bid2, 	\
+		__bv1, __bv2, TPACPI_MATCH_UNKNOWN,	\
+		__ev1, __ev2)
 
 #define TPV_QL0(__id1, __id2, __bv1, __bv2) \
 	TPV_Q(PCI_VENDOR_ID_LENOVO, __id1, __id2, __bv1, __bv2)
 
 #define TPV_QL1(__id1, __id2, __bv1, __bv2, __ev1, __ev2) \
 	TPV_Q_X(PCI_VENDOR_ID_LENOVO, __id1, __id2, 	\
-		__bv1, __bv2, __id1, __id2, __ev1, __ev2)
+		__bv1, __bv2, TPID(__id1, __id2),	\
+		__ev1, __ev2)
 
 #define TPV_QL2(__bid1, __bid2, __bv1, __bv2,		\
 		__eid1, __eid2, __ev1, __ev2) 		\
 	TPV_Q_X(PCI_VENDOR_ID_LENOVO, __bid1, __bid2, 	\
-		__bv1, __bv2, __eid1, __eid2, __ev1, __ev2)
+		__bv1, __bv2, TPID(__eid1, __eid2),	\
+		__ev1, __ev2)
 
 static const struct tpacpi_quirk tpacpi_bios_version_qtable[] __initconst = {
 	/*  Numeric models ------------------ */
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 6/6] acerhdf: return temperature in milidegree instead of degree
  2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
                     ` (3 preceding siblings ...)
  2009-11-25  6:11   ` [PATCH 5/6] thinkpad-acpi: fix detection of old ThinkPads Len Brown
@ 2009-11-25  6:12   ` Len Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Len Brown @ 2009-11-25  6:12 UTC (permalink / raw)
  To: linux-acpi; +Cc: Peter Feuerer, Andreas Mohr, Andrew Morton, Len Brown

From: Peter Feuerer <peter@piie.net>

Return temperature in milidegree instead of degree, as sysfs-api requires
the temperature in milidegree.

Signed-off-by: Peter Feuerer <peter@piie.net>
Tested-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/platform/x86/acerhdf.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 0a8f735..ab64522 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -52,7 +52,7 @@
  */
 #undef START_IN_KERNEL_MODE
 
-#define DRV_VER "0.5.17"
+#define DRV_VER "0.5.18"
 
 /*
  * According to the Atom N270 datasheet,
@@ -61,7 +61,7 @@
  * measured by the on-die thermal monitor are within 0 <= Tj <= 90. So,
  * assume 89°C is critical temperature.
  */
-#define ACERHDF_TEMP_CRIT 89
+#define ACERHDF_TEMP_CRIT 89000
 #define ACERHDF_FAN_OFF 0
 #define ACERHDF_FAN_AUTO 1
 
@@ -69,7 +69,7 @@
  * No matter what value the user puts into the fanon variable, turn on the fan
  * at 80 degree Celsius to prevent hardware damage
  */
-#define ACERHDF_MAX_FANON 80
+#define ACERHDF_MAX_FANON 80000
 
 /*
  * Maximum interval between two temperature checks is 15 seconds, as the die
@@ -85,8 +85,8 @@ static int kernelmode;
 #endif
 
 static unsigned int interval = 10;
-static unsigned int fanon = 63;
-static unsigned int fanoff = 58;
+static unsigned int fanon = 63000;
+static unsigned int fanoff = 58000;
 static unsigned int verbose;
 static unsigned int fanstate = ACERHDF_FAN_AUTO;
 static char force_bios[16];
@@ -171,7 +171,7 @@ static int acerhdf_get_temp(int *temp)
 	if (ec_read(bios_cfg->tempreg, &read_temp))
 		return -EINVAL;
 
-	*temp = read_temp;
+	*temp = read_temp * 1000;
 
 	return 0;
 }
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-25  6:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25  6:11 ACPI patches for 2.6.32-rc8 Len Brown
2009-11-25  6:11 ` [PATCH 1/6] ACPI: DMI init_set_sci_en_on_resume for HP-Compaq C700 Len Brown
2009-11-25  6:11   ` [PATCH 2/6] ACPICA: Silence the warning about _BIF returning the buffer Len Brown
2009-11-25  6:11   ` [PATCH 3/6] ACPI: Add Thinkpad T400, T500 to OSI(Linux) white-list Len Brown
2009-11-25  6:11   ` [PATCH 4/6] thinkpad-acpi: fix sign of ERESTARTSYS return Len Brown
2009-11-25  6:11   ` [PATCH 5/6] thinkpad-acpi: fix detection of old ThinkPads Len Brown
2009-11-25  6:12   ` [PATCH 6/6] acerhdf: return temperature in milidegree instead of degree Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox