Bug 9910 - OOPS early during boot on mutex_lock in acpi_smbus_transaction (NULL "hc" pointer?) - Acer TravelMate 4501WLMi
Summary: OOPS early during boot on mutex_lock in acpi_smbus_transaction (NULL "hc" poi...
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Alexey Starikovskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 12:40 UTC by Oldřich Jedlička
Modified: 2008-02-10 16:47 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
OOPS text (hand-written from camera snapshot) (1.85 KB, text/plain)
2008-02-07 12:41 UTC, Oldřich Jedlička
Details
Configuration used for 2.6.24 (46.62 KB, text/plain)
2008-02-07 12:42 UTC, Oldřich Jedlička
Details
lspci -v (6.75 KB, text/plain)
2008-02-07 12:43 UTC, Oldřich Jedlička
Details
/proc/cpuinfo (452 bytes, text/plain)
2008-02-07 12:44 UTC, Oldřich Jedlička
Details
Init HC before SBS in static case (1.50 KB, patch)
2008-02-08 11:20 UTC, Alexey Starikovskiy
Details | Diff
Output of `dmesg` for verification (30.09 KB, text/plain)
2008-02-08 11:47 UTC, Oldřich Jedlička
Details
Init HC before SBS in static case #2 (1.50 KB, patch)
2008-02-08 12:21 UTC, Alexey Starikovskiy
Details | Diff
Init HC before SBS in static case #2 try 2 (2.03 KB, patch)
2008-02-08 12:31 UTC, Alexey Starikovskiy
Details | Diff

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

Note You need to log in before you can comment on or make changes to this bug.