Bug 13458
Summary: | general protection fault - sony VGN-Z540 laptop | ||
---|---|---|---|
Product: | Drivers | Reporter: | Reinette Chatre (reinette.chatre) |
Component: | Platform | Assignee: | acpi_platform-drivers (acpi_platform-drivers) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | akpm, johannes, lenb, malattia, rui.zhang |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.30-rc8-wl | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 56331 |
Description
Reinette Chatre
2009-06-04 18:11:32 UTC
(cc malattia@linux.it) Q1. is this gpf can be reproduced consistently? i.e. does it happen every time when you enable rfkill for the first time after a fresh boot? Q2. is this a regression? did you see the same problem happen on an earlier kernel release? Q3. can this bug be reproducible in a vanilla kernel? I have a sony-z540 on hand. please give a detailed description on how to reproduce this bug. :) Oooh!! Zang, excellent. From the first report it looks like just booting and enabling rfkill (I'd say using the physical switch) should trigger the bug. If that is not it than we will have to wait for the original reporter to tell us how. Thanks Adding Johannes because this problem may be related to new rfkill changes ... (In reply to comment #2) > Q1. is this gpf can be reproduced consistently? i.e. does it happen every > time > when you enable rfkill for the first time after a fresh boot? It can. I tried the following a few times now: * reboot machine * disable/enable rfkill In all of these tests I saw the gpf when I enabled rfkill (wireless swithch to "off") for the first time after booting the machine. > Q2. is this a regression? did you see the same problem happen on an earlier > kernel release? This is not a regression. > Q3. can this bug be reproducible in a vanilla kernel? No. Your last question prompted some more testing and I have found the following: When I run with the latest wireless-testing kernel I see the problem every time. Even when I unload all wireless drivers the problem still appears. In these tests the rfkill module was loaded. When I repeat the test in a fresh pull of Linus's kernel then the problem is not present. Here I also unload wireless modules (keeping rfkill and sony-laptop loaded) and there is no gpf. So, it seems that there could be a problem with the new rfkill and the current sony-laptop. The new rfkill will be in 2.6.31 so this issue will probably show up once this kernel is released. (In reply to comment #3) > I have a sony-z540 on hand. > please give a detailed description on how to reproduce this bug. :) I reproduce the bug as follows: * boot the machine into console mode with rfkill disabled (wireless switch is on "on" position) * enable rfkill after machine is up (no need to log into machine) The gpf appears at this point. This should fix it, Reinette can you verify please? Sorry, stupid mistake here passing the wrong argument to the call. --- wireless-testing.orig/drivers/platform/x86/sony-laptop.c 2009-06-06 20:29:47.000000000 +0200 +++ wireless-testing/drivers/platform/x86/sony-laptop.c 2009-06-06 20:31:05.000000000 +0200 @@ -1135,8 +1135,7 @@ static void sony_nc_rfkill_update() if (hwblock) { if (rfkill_set_hw_state(sony_rfkill_devices[i], true)) - sony_nc_rfkill_set(sony_rfkill_devices[i], - true); + sony_nc_rfkill_set((void *)i, true); continue; } Thanks Johannes. This patch does make the gpf disappear, but unfortunately the rfkill does not behave as expected anymore. When I boot with rfkill disabled (wireless is on) then things work as expected. I then enable rfkill and this works well now also (previously there was the gpf). Now, when I disable rfkill again after this it does not take effect .... rfkill remains enabled. I tried with the other sony-laptop rfkill patch [1] recently submitted and saw same behavior. To highlight this ... without your patch rfkill does behave as expected, it just has the gpf the very first time you enable rfkill. [1] http://marc.info/?l=linux-wireless&m=124445745725419&w=2 Hmm. I can't find anything wrong. Can you grab http://git.sipsolutions.net/rfkill.git/ and run 'rfkill event' while you push the button? Or try this, maybe: diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index aec0b27..536a63c 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -1134,9 +1134,7 @@ static void sony_nc_rfkill_update() continue; if (hwblock) { - if (rfkill_set_hw_state(sony_rfkill_devices[i], true)) - sony_nc_rfkill_set(sony_rfkill_devices[i], - true); + rfkill_set_hw_state(sony_rfkill_devices[i], true); continue; } when going into hw block there's no need to set the sw state too... This is it. I ran "rfkill event" without your patch and saw: Start "rfkill event" ... RFKILL event: idx 0 type 1 op 0 soft 0 hard 0 RFKILL event: idx 1 type 2 op 0 soft 0 hard 0 RFKILL event: idx 2 type 1 op 0 soft 0 hard 0 Now enable rfkill ... RFKILL event: idx 2 type 1 op 2 soft 0 hard 1 RFKILL event: idx 0 type 1 op 2 soft 0 hard 1 RFKILL event: idx 1 type 2 op 2 soft 0 hard 1 Now disable rfkill ... RFKILL event: idx 0 type 1 op 2 soft 1 hard 1 RFKILL event: idx 1 type 2 op 2 soft 1 hard 1 Now enable rfkill ... (nothing) Now disable rfkill ... RFKILL event: idx 0 type 1 op 2 soft 1 hard 1 RFKILL event: idx 1 type 2 op 2 soft 1 hard 1 With your patch I saw this: rfkill event RFKILL event: idx 0 type 1 op 0 soft 0 hard 0 RFKILL event: idx 1 type 2 op 0 soft 0 hard 0 RFKILL event: idx 2 type 1 op 0 soft 0 hard 0 Now enable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 1 RFKILL event: idx 0 type 1 op 2 soft 0 hard 1 RFKILL event: idx 1 type 2 op 2 soft 0 hard 1 Now disable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 0 RFKILL event: idx 0 type 1 op 2 soft 0 hard 1 RFKILL event: idx 1 type 2 op 2 soft 0 hard 1 Now enable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 1 Now disable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 0 RFKILL event: idx 0 type 1 op 2 soft 0 hard 1 RFKILL event: idx 1 type 2 op 2 soft 0 hard 1 Now enable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 1 Now disable rfkill... RFKILL event: idx 2 type 1 op 2 soft 0 hard 0 RFKILL event: idx 0 type 1 op 2 soft 0 hard 1 RFKILL event: idx 1 type 2 op 2 soft 0 hard 1 With your patch rfkill keeps working as expected. Could you please send this patch to 2.6.31? Without this patch rfkill does not behave well on this platform. Thank you very much commit e1f8a19e6fc4f6d4267f6d3fe465553c3688f28e Author: Johannes Berg <johannes@sipsolutions.net> Date: Thu Jun 11 12:08:15 2009 +0200 sony: fix rfkill code again shipped in 2.6.31-rc1 closed |