Bug 9910

Summary: OOPS early during boot on mutex_lock in acpi_smbus_transaction (NULL "hc" pointer?) - Acer TravelMate 4501WLMi
Product: ACPI Reporter: Oldřich Jedlička (oldium.pro)
Component: Power-BatteryAssignee: Alexey Starikovskiy (astarikovskiy)
Status: CLOSED CODE_FIX    
Severity: blocking CC: acpi-bugzilla
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: OOPS text (hand-written from camera snapshot)
Configuration used for 2.6.24
lspci -v
/proc/cpuinfo
Init HC before SBS in static case
Output of `dmesg` for verification
Init HC before SBS in static case #2
Init HC before SBS in static case #2 try 2

Description Oldřich Jedlička 2008-02-07 12:40:08 UTC
Latest working kernel version: 2.6.23
Earliest failing kernel version: 2.6.24
Distribution: Gentoo, vanilla-sources
Hardware Environment: notebook Acer TravelMate 4501WLMi, Pentium M 1.6GHz, ATI Mobility Radeon 9700, two monitors (panel+LCD)
Software Environment: N/A
Problem Description:
Kernel ends-up with OOPS during boot - very early after the video is switched to graphics mode with Tux logo. It looks like there is something wrong in initialization of ACPI SBS.

I tried to investigate and it seems that the NULL parameter was passed as a parameter "hc" to acpi_smbus_transaction.

I will attach text of OOPS (written down from camera-taken snapshot), my .config, `lspci -v`, /proc/cpuinfo. What else?

Steps to reproduce:
Always prints OOPS at the same stage of boot (very early after the video mode is switched to graphics), no need to do special steps
Comment 1 Oldřich Jedlička 2008-02-07 12:41:10 UTC
Created attachment 14740 [details]
OOPS text (hand-written from camera snapshot)
Comment 2 Oldřich Jedlička 2008-02-07 12:42:22 UTC
Created attachment 14741 [details]
Configuration used for 2.6.24
Comment 3 Oldřich Jedlička 2008-02-07 12:43:10 UTC
Created attachment 14742 [details]
lspci -v
Comment 4 Oldřich Jedlička 2008-02-07 12:44:59 UTC
Created attachment 14743 [details]
/proc/cpuinfo
Comment 5 Andrew Morton 2008-02-07 13:03:45 UTC
Thanks.  Next time, it's fine to just appatch the jpeg file to the
bug report - no need to do all that typing!

I'll tag this as a regression.
Comment 6 Alexey Starikovskiy 2008-02-08 11:20:35 UTC
Created attachment 14756 [details]
Init HC before SBS in static case

Please try this patch.
Comment 7 Oldřich Jedlička 2008-02-08 11:46:17 UTC
Works great. As a verification I looked at the battery status and it works (/proc/acpi/battery/BAT0/*). I will also attach `dmesg` output to you if you want to check anything.
Comment 8 Oldřich Jedlička 2008-02-08 11:47:38 UTC
Created attachment 14757 [details]
Output of `dmesg` for verification
Comment 9 Alexey Starikovskiy 2008-02-08 11:50:30 UTC
Hm, do you really have two batteries installed?
Comment 10 Oldřich Jedlička 2008-02-08 12:07:56 UTC
(In reply to comment #9)
> Hm, do you really have two batteries installed?

Not really; it is possible to install the second battery, but it is not my case. The file /proc/acpi/battery/BAT1/{alarm,info,state} correctly contains text "present: no".
Comment 11 Oldřich Jedlička 2008-02-08 12:15:27 UTC
Actually 2.6.23 also shows BAT1 as present event it is not present:

ACPI: Smart Battery System [SMBC]: AC Adapter [AC0] (on-line)
ACPI: Smart Battery System [SMBC]: Battery Slot [BAT0] (battery present)
ACPI: Smart Battery System [SMBC]: Battery Slot [BAT1] (battery present)

But the files in /proc/acpi are correctly showing the status in both kernels.
Comment 12 Alexey Starikovskiy 2008-02-08 12:21:06 UTC
Created attachment 14759 [details]
Init HC before SBS in static case #2

Please try this patch. Typo in printk fixed.
Comment 13 Oldřich Jedlička 2008-02-08 12:28:03 UTC
(In reply to comment #12)
> Please try this patch. Typo in printk fixed.

This patch is identical to former one...
Comment 14 Alexey Starikovskiy 2008-02-08 12:31:06 UTC
Created attachment 14760 [details]
Init HC before SBS in static case #2 try 2

Right, forgot to export new version...
Comment 15 Oldřich Jedlička 2008-02-08 13:21:04 UTC
(In reply to comment #14)
> Created an attachment (id=14760) [details]
> Init HC before SBS in static case #2 try 2
> 
> Right, forgot to export new version...

Perfect, works. Also the battery status is correct in `dmesg`:

ACPI: Smart Battery System [SBS0]: AC Adapter [AC0] (on-line)
ACPI: Smart Battery System [SBS0]: Battery Slot [BAT0] (battery present)
ACPI: Smart Battery System [SBS0]: Battery Slot [BAT1] (battery absent)
Comment 16 Alexey Starikovskiy 2008-02-08 13:24:54 UTC
Thanks for report.
Comment 17 Oldřich Jedlička 2008-02-08 13:27:14 UTC
Thanks for fast response and for the fix.
Comment 18 Len Brown 2008-02-09 00:26:47 UTC
thanks for the quick response, Alexey --
and thanks for the quick testing,  Oldřich.

patch in comment #14 applied to acpi tree
Comment 19 Len Brown 2008-02-10 14:45:54 UTC
patch in comment #14 shipped in linux-2.6.24-rc22.
closed.
Comment 20 Len Brown 2008-02-10 16:47:45 UTC
linux-2.6.24-git22, that is