Skip to contentSkip to conversation

ACPI / battery: Fix parsing _BIX return value

PATCH Ben Hutchings 2 participants 2 messages Oct 6, 2013 – Oct 8, 2013 1 message not in the archive ACPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 18659783.iZRLPaKV6J@aoki

#1 lore raw
Quoted 18 lines · Francisco Castro

From: Ben Hutchings <[email protected]>

Quoted 17 lines

3.2.51-rc1 review patch. If anyone has any objections, please let me know.

------------------
From: Lan Tianyu <[email protected]>

commit 016d5baad04269e8559332df05f89bd95b52d6ad upstream.

The _BIX method returns extended battery info as a package. According the ACPI spec (ACPI 5, Section 10.2.2.2), the first member of that package should be "Revision". However, the current ACPI battery driver treats the first member as "Power Unit" which should be the second member. This causes the result of _BIX return data parsing to be incorrect.

Fix this by adding a new member called 'revision' to struct acpi_battery and adding the offsetof() information on it to extended_info_offsets[] as the first row.

[...]

Quoted 12 lines

Hello,

Before anything, sorry for my broken english, and thank you all for reading my mail.

I noticed this patch, since it happened to be added recently to the standard ubuntu kernel 3.8.0.31; and these two lines makes the battery module fail with laptop (a NEC LZ750/LS) which previously worked. After removing these two lines and recompiling, it worked again.

The lines that dmesg is now showing, are:

Quoted 7 lines
[    2.272970] ACPI Warning: For \_SB_.PCI0.LPCB.EC__.BAT1._BIX: Return 
Package is too small - found 19 elements, expected 20 (20121018/nspredef-679)
[    2.272985] battery: probe of PNP0C0A:00 failed with error -14

I believe a new (working) patch is needed, since this breaks compatibility with hardware that's somewhat new, and still on sale. I hope this mail is not too late, and this can be fixed.

You should report this to the Ubuntu kernel maintainers via Launchpad so they can make a decision whether to revert this change in their packaged kernel.

Hopefully Lan Tianyu and other ACPI developers will work out how to fix this completely and then that fix can go into later stable updates.

I only look after the stable 3.2.y branch, so there's little I can do to help you beyond this.

Ben.

Signature · 2 lines
Ben Hutchings
Who are all these weirdos? - David Bowie, reading IRC for the first time
#2 lore raw
Quoted 40 lines · Ben Hutchings
Quoted 18 lines · Francisco Castro

From: Ben Hutchings <[email protected]>

Quoted 17 lines

3.2.51-rc1 review patch. If anyone has any objections, please let me know.

------------------
From: Lan Tianyu <[email protected]>

commit 016d5baad04269e8559332df05f89bd95b52d6ad upstream.

The _BIX method returns extended battery info as a package. According the ACPI spec (ACPI 5, Section 10.2.2.2), the first member of that package should be "Revision". However, the current ACPI battery driver treats the first member as "Power Unit" which should be the second member. This causes the result of _BIX return data parsing to be incorrect.

Fix this by adding a new member called 'revision' to struct acpi_battery and adding the offsetof() information on it to extended_info_offsets[] as the first row.

[...]

Quoted 12 lines

Hello,

Before anything, sorry for my broken english, and thank you all for reading my mail.

I noticed this patch, since it happened to be added recently to the standard ubuntu kernel 3.8.0.31; and these two lines makes the battery module fail with laptop (a NEC LZ750/LS) which previously worked. After removing these two lines and recompiling, it worked again.

The lines that dmesg is now showing, are:

Quoted 7 lines
[    2.272970] ACPI Warning: For \_SB_.PCI0.LPCB.EC__.BAT1._BIX: Return 
Package is too small - found 19 elements, expected 20 (20121018/nspredef-679)
[    2.272985] battery: probe of PNP0C0A:00 failed with error -14

I believe a new (working) patch is needed, since this breaks compatibility with hardware that's somewhat new, and still on sale. I hope this mail is not too late, and this can be fixed.

Quoted 6 lines

You should report this to the Ubuntu kernel maintainers via Launchpad so they can make a decision whether to revert this change in their packaged kernel.

Hopefully Lan Tianyu and other ACPI developers will work out how to fix this completely and then that fix can go into later stable updates.

Sorry for later response. Just come back from vacation.

Francisco, please attach the output of acpidump on your machine to bugzilla. Thanks.

https://bugzilla.kernel.org/show_bug.cgi?id=60519

Quoted 6 lines

I only look after the stable 3.2.y branch, so there's little I can do to help you beyond this.

Ben.

Signature · 6 lines
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html