manoj.iyer | 3 Aug 2012 06:29
Favicon

[PATCH] thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR

From: Manoj Iyer <manoj.iyer@...>

In the latest V-series bios DMI_PRODUCT_VERSION does not contain
the string Lenovo or Thinkpad, but is set to the model number, this
causes the thinkpad_acpi module to fail to load. Recognize laptop
as Lenovo using DMI_BIOS_VENDOR instead, which is set to Lenovo.

Signed-off-by: Manoj Iyer <manoj.iyer@...>
---
 drivers/platform/x86/thinkpad_acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index e7f7328..eec0b65 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
 <at>  <at>  -8657,7 +8657,8  <at>  <at>  static int __must_check __init get_thinkpad_model_data(
 		}
 	}

-	s = dmi_get_system_info(DMI_PRODUCT_VERSION);
+	s = dmi_get_system_info(DMI_PRODUCT_VERSION) ?
+		dmi_get_system_info(DMI_BIOS_VENDOR) : NULL;
 	if (s && !(strnicmp(s, "ThinkPad", 8) && strnicmp(s, "Lenovo", 6))) {
 		tp->model_str = kstrdup(s, GFP_KERNEL);
 		if (!tp->model_str)
--

-- 
1.7.9.5

------------------------------------------------------------------------------
(Continue reading)

manoj.iyer | 6 Aug 2012 23:23
Favicon

[PATCH] thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR

From: Manoj Iyer <manoj.iyer@...>

In the latest V-series bios DMI_PRODUCT_VERSION does not contain
the string Lenovo or Thinkpad, but is set to the model number, this
causes the thinkpad_acpi module to fail to load. Recognize laptop
as Lenovo using DMI_BIOS_VENDOR instead, which is set to Lenovo.

Signed-off-by: Manoj Iyer <manoj.iyer@...>
---
 drivers/platform/x86/thinkpad_acpi.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index e7f7328..17692c8 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
 <at>  <at>  -8658,11 +8658,16  <at>  <at>  static int __must_check __init get_thinkpad_model_data(
 	}

 	s = dmi_get_system_info(DMI_PRODUCT_VERSION);
-	if (s && !(strnicmp(s, "ThinkPad", 8) && strnicmp(s, "Lenovo", 6))) {
+	if (s && !(strnicmp(s, "ThinkPad", 8) && strnicmp(s, "Lenovo", 6)))
 		tp->model_str = kstrdup(s, GFP_KERNEL);
-		if (!tp->model_str)
-			return -ENOMEM;
-	}
+	else {
+		s = dmi_get_system_info(DMI_BIOS_VENDOR);
+		if (s && !(strnicmp(s, "Lenovo", 6)))
+			tp->model_str = kstrdup(s, GFP_KERNEL);
(Continue reading)

Picon
Favicon

Re: [PATCH] thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR

On Mon, 06 Aug 2012, manoj.iyer@... wrote:
> From: Manoj Iyer <manoj.iyer@...>
> 
> In the latest V-series bios DMI_PRODUCT_VERSION does not contain
> the string Lenovo or Thinkpad, but is set to the model number, this
> causes the thinkpad_acpi module to fail to load. Recognize laptop
> as Lenovo using DMI_BIOS_VENDOR instead, which is set to Lenovo.

Please add here the testing you did.

> Signed-off-by: Manoj Iyer <manoj.iyer@...>
> ---
>  drivers/platform/x86/thinkpad_acpi.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index e7f7328..66dfdef 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
>  <at>  <at>  -8663,6 +8663,14  <at>  <at>  static int __must_check __init get_thinkpad_model_data(
>  		if (!tp->model_str)
>  			return -ENOMEM;
>  	}
> +	else {

Please fix this:  } else {   all in a single line.

> +		s = dmi_get_system_info(DMI_BIOS_VENDOR);
> +		if (s && !(strnicmp(s, "Lenovo", 6))) {
> +			tp->model_str = kstrdup(s, GFP_KERNEL);
(Continue reading)

Vedran Rodic | 6 Aug 2012 17:33
Picon
Gravatar

Thinkpad X230, Kernel 3.5.0, events when connecting/disconnecting power supploy from the Ultrabase

Hi,

This happens when connecting/disconnecting the power  adapter from the ultrabase

Hardware is X230, with Ivy Bridge CPU(lspci below)

[ 4477.372420] thinkpad_acpi: unhandled HKEY event 0x6040
[ 4477.372423] thinkpad_acpi: please report the conditions when this
event happened to ibm-acpi-devel@...
[ 4477.372870] thinkpad_acpi: EC reports that Thermal Table has changed
[ 4477.373622] thinkpad_acpi: unknown possible thermal alarm or
keyboard event received
[ 4477.373626] thinkpad_acpi: unhandled HKEY event 0x6040
[ 4477.373630] thinkpad_acpi: please report the conditions when this
event happened to ibm-acpi-devel@...

00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge
Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host
Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Panther Point MEI
Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation Panther Point KT
Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network
Connection (rev 04)
00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced
Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Panther Point High Definition
(Continue reading)

Curliss Clark | 6 Aug 2012 22:22
Picon
Favicon

Thinkpad T420 running RHEL 6 - Thermal alarm recieved

thinkpad_acpi: THERMAL ALERT: unknown thermal alarm received
thinkpad_acpi: unhandled HKEY event 0x6040
thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
thinkpad_acpi: EC reports that Thermal Table has changed

Med venlig hilsen / Best regards

Curliss Clark
Unix Specialist
GTS Strategic Outsourcing Delivery
Office F136
mobile: +45 41207866
CURLISS-tHohwfJNb0nQT0dZR+AlfA@public.gmane.org

IBM Denmark A/S
Prøvensvej 1
DK-2605  Brøndby
Denmark

 

Medmindre andet er angivet ovenfor: / Unless Otherwise Stated Above:
IBM Danmark ApS
Nymøllevej 91
2800 Kongens Lyngby, Danmark
CVR nr.: 65305216

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@...
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel
Andrea Oliveri | 31 Aug 2012 03:30
Picon

PATCH: Initial support for Lenovo T430

Hello everyone,(sorry for my English..)

i made a patch that insert an initial support for Thinkpad T430.
The patch makes this changes in driver's structure:

1) Defines a new field in struct tpacpi_quirk: bios_date, an unsigned
int field that contain the bios release date of the machine in this
format MMDDYYYY (e.s 04/23/1988 -> 04231988). I introduced it because in
new bioses there isn't the EC version string (precisely this string
exists but it's not attainable from the kernel with the DMI syscall
family, no ACPI method exist in DSDT table to extract it). I set to 0
the bios release date of other thinkpad in quirks list and i used for
the new generation machines (like T430) the quirk type TPV_QL0

2) I introduce 2 new functions comapare_date()that compares two
bios_date to determine which of the two is more recent, and quirk2date()
that accepts a quirk and returns the bios_date associated.

3) I change some parts of the thermal subdriver, so it's possibile for
new generation thinkpad without EC version string to export in sysfs the
temperature informations also i set the subdriver to export in sysfs
only the temperature sensors present in the machine (no an infinite list
of tempX_input with 0 value).

I post here the patch file http://pastebin.com/ZDxZyw1P

I discovered some interesting facts about mute LED, GPS, _OSI string,
and accelerometer. So I continue to work to implement these features.

Give me some feedback please, particularly please test the thermal
subdriver on thinkpad of past generations to check that i don't wreck
anything!

Be lenient, its my first patch at kernel driver that i make =)

Andrea (Andrew) Oliveri

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Henrique de Moraes Holschuh | 31 Aug 2012 03:57
Picon
Favicon

Re: PATCH: Initial support for Lenovo T430

On Fri, 31 Aug 2012, Andrea Oliveri wrote:
> 1) Defines a new field in struct tpacpi_quirk: bios_date, an unsigned
> int field that contain the bios release date of the machine in this
> format MMDDYYYY (e.s 04/23/1988 -> 04231988). I introduced it because in
> new bioses there isn't the EC version string (precisely this string
> exists but it's not attainable from the kernel with the DMI syscall
> family, no ACPI method exist in DSDT table to extract it). I set to 0
> the bios release date of other thinkpad in quirks list and i used for
> the new generation machines (like T430) the quirk type TPV_QL0

It is acceptable to get the EC version directly from the EC register space,
as long as you do DMI matches beforehand.  That might be better than a
date-based quirk list.

You say the string does exist.  Where is it?  WMI?

> 3) I change some parts of the thermal subdriver, so it's possibile for
> new generation thinkpad without EC version string to export in sysfs the
> temperature informations also i set the subdriver to export in sysfs
> only the temperature sensors present in the machine (no an infinite list
> of tempX_input with 0 value).

This is an incompatible change in the userspace ABI, which is absolutely
unacceptable except in the most extreme cases.  It has to be fixed in some
other way.

How does the temperature sensors behave in the newer Lenovo ECs?

> I post here the patch file http://pastebin.com/ZDxZyw1P
> 
> I discovered some interesting facts about mute LED, GPS, _OSI string,
> and accelerometer. So I continue to work to implement these features.

Care to document them before you attempt to publish any code changes?
Depending on how you discovered them [e.g. you decompiled or disassembled
windows drivers], we will need a clean-room implementation aproach, where
you document how to do it, and someone else writes the code.

> Be lenient, its my first patch at kernel driver that i make =)

It has some rough edges for sure.  If you want to improve on that area, read
Documentation/SubmittingPatches in the kernel source tree...

--

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Andrea Oliveri | 31 Aug 2012 05:06
Picon

Re: PATCH: Initial support for Lenovo T430

Thank you for reply me.
It is acceptable to get the EC version directly from the EC register
space,
> as long as you do DMI matches beforehand.  That might be better than a
> date-based quirk list.
> 
> You say the string does exist.  Where is it?  WMI?

The string is visible if you use dmidecode (the string is Firmware
Version: 1.7 i suppose  but i'm not sure that is the EC version because
on Lenovo documentation is 1.07)

>This is an incompatible change in the userspace ABI, which is
absolutely
> unacceptable except in the most extreme cases.  It has to be fixed in
some
> other way.
> 
> How does the temperature sensors behave in the newer Lenovo ECs?

Ok I expected it :) In T430 there is only one temperature sensor (as
reported in DSDT with name SB.PCI0.LPC.EC.TMP0) that correspond to 0x78
address in EC ram. The others (from 0x79 to 0x81) dont exist and report
0 so i thought that i removed theyr files from sysfs. Big error,
right? :)

> I discovered some interesting facts about mute LED, GPS, _OSI string,
> > and accelerometer. So I continue to work to implement these
features.Care to document them before you attempt to publish any code
changes?
> Depending on how you discovered them [e.g. you decompiled or
disassembled
> windows drivers], we will need a clean-room implementation aproach,
where
> you document how to do it, and someone else writes the code.
> 

Oh no! I discovered them only with disassembled DSDT code, looking the
behavior under windows (i don't decompile drivers or else..), with some
informations found on the web.
I discovered that if i pass OSI string "Linux" at boot the machine it
deactivate the automatic control of mute speaker led when the button is
pressed, i discovered how to turn on it via software. It's present maybe
in DSDT a strange debug information about GPS device presents in the
machine (maybe its possible to interact with it through ACPI?) I read
documentation of HDAPS kernel module i tried to implement accelerometer
directly in thinkpad_acpi but i discovered that the EC commands valid
for old Thinkpad dont function anymore...

>It has some rough edges for sure.
No problem i must learn! :) I will follow your suggestions and i will
read the documentation.

Another question: how can i read directly in user mode the NVRAM? (i
simply read the /dev/nvram file? or /dev/port or /dev/mem?).
Sorry but I'm starting to get interested in this field seriously only
now
Thank you

Il giorno gio, 30/08/2012 alle 22.57 -0300, Henrique de Moraes Holschuh
ha scritto:
> On Fri, 31 Aug 2012, Andrea Oliveri wrote:
> > 1) Defines a new field in struct tpacpi_quirk: bios_date, an
unsigned
> > int field that contain the bios release date of the machine in this
> > format MMDDYYYY (e.s 04/23/1988 -> 04231988). I introduced it
because in
> > new bioses there isn't the EC version string (precisely this string
> > exists but it's not attainable from the kernel with the DMI syscall
> > family, no ACPI method exist in DSDT table to extract it). I set to
0
> > the bios release date of other thinkpad in quirks list and i used
for
> > the new generation machines (like T430) the quirk type TPV_QL0
> 
> It is acceptable to get the EC version directly from the EC register
space,
> as long as you do DMI matches beforehand.  That might be better than a
> date-based quirk list.
> 
> You say the string does exist.  Where is it?  WMI?
> 
> > 3) I change some parts of the thermal subdriver, so it's possibile
for
> > new generation thinkpad without EC version string to export in sysfs
the
> > temperature informations also i set the subdriver to export in sysfs
> > only the temperature sensors present in the machine (no an infinite
list
> > of tempX_input with 0 value).
> 
> This is an incompatible change in the userspace ABI, which is
absolutely
> unacceptable except in the most extreme cases.  It has to be fixed in
some
> other way.
> 
> How does the temperature sensors behave in the newer Lenovo ECs?
> 
> > I post here the patch file http://pastebin.com/ZDxZyw1P
> > 
> > I discovered some interesting facts about mute LED, GPS, _OSI
string,
> > and accelerometer. So I continue to work to implement these
features.
> 
> Care to document them before you attempt to publish any code changes?
> Depending on how you discovered them [e.g. you decompiled or
disassembled
> windows drivers], we will need a clean-room implementation aproach,
where
> you document how to do it, and someone else writes the code.
> 
> > Be lenient, its my first patch at kernel driver that i make =)
> 
> It has some rough edges for sure.  If you want to improve on that
area, read
> Documentation/SubmittingPatches in the kernel source tree...
> 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Kisl | 21 Aug 2012 12:53
Picon

thinkpad_acpi: unknown possible thermal alarm or keyboard event received

Dear sirs or madams,

as requested in my syslog, I'd like to inform you about the
circumstances of a crash/reboot I encounered. It occurred while
I was watching a FLV video in VLC, although I don't think that
is related. A similar crash/reboot happend one or two days ago
when the system was basically idle with only xfce4-terminal
running. I think it's more likely to do with the weather. The last
few days were exceptionally warm, with room temperatures up to
38 deg C in shadow. The Thinkpad was also in shadow both times.

I hope that some of the information below can help you. If you
need further exploration, please CC me since I'm not a member
of your mailing list.

Greetings,
Sven (Kisl)

# acpi -V, shortly after today's crash (exceprt):
Thermal 0: ok, 54.0 degrees C
Thermal 0: trip point 0 switches to mode critical at
     temperature 98.0 degrees C

# /var/log/syslog excerpt:
anacron[7113]: Normal exit (0 jobs run)
kernel: [***99.317991] e1000e 0000:00:19.0: BAR 0: set to
     [mem 0xf1500000-0xf151ffff] (PCI address [0xf1500000-0xf151ffff])
kernel: [***99.318006] e1000e 0000:00:19.0: BAR 1: set to
     [mem 0xf152b000-0xf152bfff] (PCI address [0xf152b000-0xf152bfff])
kernel: [***99.318029] e1000e 0000:00:19.0: BAR 2: set to [io 
0x4080-0x409f]
     (PCI address [0x4080-0x409f])
kernel: [***99.318105] e1000e 0000:00:19.0: restoring config space at offset
     0xf (was 0x100, writing 0x10a)
kernel: [***99.318146] e1000e 0000:00:19.0: restoring config space at offset
     0x1 (was 0x100000, writing 0x100007)
kernel: [***99.318204] e1000e 0000:00:19.0: PME# disabled
kernel: [***99.318338] e1000e 0000:00:19.0: irq 41 for MSI/MSI-X
kernel: [***99.342348] thinkpad_acpi: unknown possible thermal alarm or
     keyboard event received
kernel: [***99.342359] thinkpad_acpi: unhandled HKEY event 0x6040
kernel: [***99.342364] thinkpad_acpi: please report the conditions when this
     event happened to ibm-acpi-devel@...
kernel: imklog 5.8.6, log source = /proc/kmsg started.
rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="880"
     x-info="http://www.rsyslog.com"] start
rsyslogd: rsyslogd's groupid changed to 103
rsyslogd: rsyslogd's userid changed to 101
rsyslogd-2039: Could not open output pipe '/dev/xconsole'
     [try http://www.rsyslog.com/e/2039 ]
kernel: [    0.000000] Initializing cgroup subsys cpuset
kernel: [    0.000000] Initializing cgroup subsys cpu

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Toralf Förster | 27 Aug 2012 21:23
Picon
Picon

unknown possible thermal alarm or keyboard event received

Hi,

as requested by you here it is (ThinkPad T420, model 4180f65), stable Gentoo Linux kernel 3.5.3 :

n22 ~ # grep -B 3 -A 3 'unhandled HKEY event' /var/log/messages
2012-08-26T11:12:49.000+02:00 n22 nobody: monitor.sh: display=:0 int=LVDS1 ext=VGA1
2012-08-26T11:13:04.067+02:00 n22 kernel: ata1: hard resetting link
2012-08-26T11:13:04.105+02:00 n22 kernel: thinkpad_acpi: unknown possible thermal alarm or keyboard
event received
2012-08-26T11:13:04.105+02:00 n22 kernel: thinkpad_acpi: unhandled HKEY event 0x6040
2012-08-26T11:13:04.105+02:00 n22 kernel: thinkpad_acpi: please report the conditions when this
event happened to ibm-acpi-devel <at> lists.sourceforge.net
2012-08-26T11:13:04.105+02:00 n22 kernel: thinkpad_acpi: EC reports that Thermal Table has changed
2012-08-26T11:13:04.000+02:00 n22 nobody: ACPI event : ibm/hotkey HKEY 00000080 00006040
--
2012-08-26T11:25:01.000+02:00 n22 cron[13760]: (root) CMD (/usr/lib/sa/sa1 60 5 >/dev/null)
2012-08-26T11:25:03.244+02:00 n22 kernel: ata1: hard resetting link
2012-08-26T11:25:03.263+02:00 n22 kernel: thinkpad_acpi: unknown possible thermal alarm or keyboard
event received
2012-08-26T11:25:03.263+02:00 n22 kernel: thinkpad_acpi: unhandled HKEY event 0x6040
2012-08-26T11:25:03.263+02:00 n22 kernel: thinkpad_acpi: please report the conditions when this
event happened to ibm-acpi-devel <at> lists.sourceforge.net
2012-08-26T11:25:03.264+02:00 n22 kernel: thinkpad_acpi: EC reports that Thermal Table has changed
2012-08-26T11:25:03.000+02:00 n22 nobody: ACPI event : ibm/hotkey HKEY 00000080 00006040

--

-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Gmane