login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
27
Re: [2.624-rc1 regression] lost battery information
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Alexey Starikovskiy <aystarik@...>
To: Andrey Borzenkov <arvidjaar@...>
Cc: <linux-acpi@...>, <linux-kernel@...>, Frans Pop <elendil@...>
Subject:
Re: [2.624-rc1 regression] lost battery information
Date: Saturday, October 27, 2007 - 11:20 am
Andrey Borzenkov wrote:
quoted text
> On Saturday 27 October 2007, Alexey Starikovskiy wrote: >> Andrey, >> Please try the attached patch. I choose to do snprintf() instead of direct >> copy, as your previous message showed empty OEM type. >> > > Not quite. Now I get > > OEM info: 0
Ok, I was hoping to see some number starting with 0, which would be printed as empty string...
quoted text
> > while before I got empty string. If I read acpi_extract_package correctly, it > actually interpreted integer as string without any conversion. Which in this > case obviously gave us empty string (integer being 0). I'd prefer to remain > compatible.
As you wish... :) Please check the attached patch.
quoted text
> > also > > {pts/1}% cat /sys/class/power_supply/BAT1/manufacturer > 0 > > which is rather weird manufacturer name :) > >> Thanks, >> Alex. >> >> Andrey Borzenkov wrote: >>> On Friday 26 October 2007, Alexey Starikovskiy wrote: >>>> Your cat's "Bad address" means -EFAULT, according to "man errno". >>>> Please apply this patch to see what exactly failed... >>> [ 1191.471572] ACPI: element[12]->type = 1, expected string >>> [ 1196.640065] ACPI: element[12]->type = 1, expected string >>> [ 1199.479773] ACPI: element[12]->type = 1, expected string >>> [ 1199.745435] ACPI: element[12]->type = 1, expected string >>> >>> it is "OEM type". For reference here is _BIF from my DSDT: >>> >>> Method (_BIF, 0, NotSerialized) >>> { >>> Name (BUFF, Package (0x0D) {}) >>> Store (0x00, Index (BUFF, 0x00)) >>> Store (\_SB.MEM.BDV2, Local2) >>> Multiply (\_SB.MEM.BDC2, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x01)) >>> Multiply (\_SB.MEM.BLF2, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x02)) >>> Store (\_SB.MEM.BTC2, Index (BUFF, 0x03)) >>> Store (\_SB.MEM.BDV2, Index (BUFF, 0x04)) >>> Multiply (\_SB.MEM.BCW2, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x05)) >>> Multiply (\_SB.MEM.BCL2, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x06)) >>> Multiply (\_SB.MEM.BG12, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x07)) >>> Multiply (\_SB.MEM.BG22, Local2, Local0) >>> Divide (Local0, 0x03E8, Local1, Local0) >>> Store (Local0, Index (BUFF, 0x08)) >>> Store (\_SB.MEM.BMN2, Index (BUFF, 0x09)) >>> Store (\_SB.MEM.BSN2, Index (BUFF, 0x0A)) >>> Store (\_SB.MEM.BTP2, Index (BUFF, 0x0B)) >>> Store (\_SB.MEM.BOI2, Index (BUFF, 0x0C)) >>> Return (BUFF) >>> } >>> >>> This is behaviour change. Previous battery.c used generic >>> acpi_extract_package which allowed (allows) for object of type integer >>> when string is requested: >>> >>> case ACPI_TYPE_INTEGER: >>> switch (format_string[i]) { >>> case 'N': >>> size_required += sizeof(acpi_integer); >>> tail_offset += sizeof(acpi_integer); >>> break; >>> case 'S': >>> size_required += >>> sizeof(char *) + sizeof(acpi_integer) >>> + sizeof(char); >>> tail_offset += sizeof(char *); >>> break; >>> >>> while current battery.c:extract_package fails: >>> >>> if (offsets[i].mode) { >>> if (element->type != ACPI_TYPE_STRING && >>> element->type != ACPI_TYPE_BUFFER) { >>> printk (KERN_ERR PREFIX "element[%d]->type = %x, expected string\n", i, >>> element->type); >>> return -EFAULT; >>> } >>> >>> well, while it could be BIOS fault this happily worked before ... This is >>> obviously also the reason why I do not have anything in /sys >>> >>> Fans, could you check whether you have the same issue using test patch? > >
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Fri Oct 26, 12:24 pm)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Fri Oct 26, 12:57 pm)
Re: ACPI: use select POWER_SUPPLY for AC, BATTERY and SBS (w...
, Matej Laitl
, (Fri Oct 26, 5:05 pm)
Re: [2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Fri Oct 26, 1:20 pm)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Fri Oct 26, 2:12 pm)
Re: [2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Fri Oct 26, 2:15 pm)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Fri Oct 26, 2:32 pm)
Re: [2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Sat Oct 27, 3:22 am)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Sat Oct 27, 9:45 am)
Re: [2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Sat Oct 27, 10:55 am)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Sat Oct 27, 11:20 am)
Re: [2.624-rc1 regression] lost battery information
, Andrey Borzenkov
, (Sat Oct 27, 12:49 pm)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Sat Oct 27, 12:59 pm)
Re: [2.624-rc1 regression] lost battery information
, Frans Pop
, (Sat Oct 27, 12:16 pm)
Re: [2.624-rc1 regression] lost battery information
, Frans Pop
, (Fri Oct 26, 4:57 pm)
Re: [2.624-rc1 regression] lost battery information
, Alexey Starikovskiy
, (Fri Oct 26, 5:07 pm)
Re: [2.624-rc1 regression] lost battery information
, Frans Pop
, (Fri Oct 26, 2:00 pm)
Re: [2.624-rc1 regression] lost battery information
, Frans Pop
, (Fri Oct 26, 12:44 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Natalie Protasevich
[BUG] New Kernel Bugs
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Greg KH
[GIT PATCH] driver core patches against 2.6.24
git
:
openbsd-misc
:
linux-netdev
:
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Patrick McHardy
[NET_SCHED 00/04]: External SFQ classifiers/flow classifier
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Colocation donated by:
Who's online
There are currently
1 user
and
835 guests
online.
Online users
sdrh40
Syndicate